Skip to content

Make it easy to change the default action #85

Open
@gma

Description

@gma

When you define a route that gobbles up all requests in your own app.rb file you preclude all standard routes from getting a look in. Two options spring to mind:

  1. Allow users to insert the standard infrastructure oriented routes with one line of code, just above their own get blocks: Nesta.routes_for(:robots, :css, :atom)

  2. Get them to define the default route explicitly, and then use it internally instead of the real one:

module Nesta
  class App
    greedy_routes do
      get '*' do
        'blah blah'
      end
    end
  end
end

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions