Skip to content
This repository was archived by the owner on Jan 16, 2024. It is now read-only.
This repository was archived by the owner on Jan 16, 2024. It is now read-only.

404 error handling #34

@jonleighton

Description

@jonleighton

When PushType can't find a node, it raises ActiveRecord::RecordNotFound. I realised that I can add a rescue_from handler to my ApplicationController in order to handle this gracefully, but this isn't documented.

It would be helpful to add some doc for this, but I actually think it would be better to ensure that the *permalink route doesn't match unless the permalink exists in the database. Then, users can put other routes after the mount_push_type call and define their own handling for 404s (or just let Rails do its default thing, rendering public/404.html).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions