I ran
rails StresslessHomeStaging
as well as webrick.
Feeding http://localhost:3000 to Firefox works fine.
I then ran
ruby script/generate controller BeforeAfter
This created BeforeAfterController
I then did
class BeforeAfterController < ApplicationController
def before_and_after
end
end
I then fed
http://localhost:3000/BeforeAfter/before_and_after
to Firefox expecting a Template is Missing error.
Instead, I get a
Routing Error
No route matches “/BeforeAfter/before_and_after” with {:method=>:get}
Clearly, I do not understand what the proper routing is.
What is the proper routing when a controller has multiple capitals in
the name?
Ralph S. wrote:
What is the proper routing when a controller has multiple capitals in
the name?
I figured it out … it’s
http://localhost:3000/before_after/before_and_after
Ralph S. wrote:
I figured it out … it’s
http://localhost:3000/before_after/before_and_after
But that leaves another question …
Why does
http://localhost:3000/BEFORE_AFTER/before_and_after
generate an (expected) “Template is missing”
but
http://localhost:3000/before_after/before_and_After (note the
capital A)
generates a
Unknown action
No action responded to before_and_After. Actions: before_and_after
Is Ruby case insensitive in the controller name but case sensitive in
the action name???
Is Ruby case insensitive in the controller name but case sensitive in
the action name???
Ruby routes are case sensitive.