Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Are blank routes preferred or routes with / #336

Open
@arianf

Description

When trying to add a route at the root of a resource, what is preferred:

resources :legal, only: %i[index] do
 collection do
 post '', action: :legal_submit
 # OR
 post '/', action: :legal_submit
 end
end

Both go to the same route: POST /legal.

It would be nice if rails supported omitting the first param like post action: :legal_submit

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

        AltStyle によって変換されたページ (->オリジナル) /