Skip to content

How does the route parsing work and what is the recommended way to split routes out into multiple files? #10

@davesag

Description

@davesag

Once a Sinatra project gets beyond a certain level of complexity the my_sinatra_app.rb file gets rather cluttered with route handling code. While the separation of helper code out into multiple files is well documented, I am yet to find a best practice approach to separating out route handlers into multiple files.

Having a clearer understanding how exactly how Sinatra parses routes in the first place would of course seem to be the way forward here, and then, based on this understanding, some example code and documentation could be written to cover this off canonically.

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