So, I’m trying to access other actions in my controller, and it assums I want “show” every time, when I really just want… the action I just had in my URL.
this is in my routes:
map.resources :attachments
And when I do
domain/attachments/any_action?params
I get this error:
ActionController::UnknownAction (No action responded to show. Actions: {list of actions}
Using rails 2.3.8
The rule in Rails is first route matched, first route served.
Because you define a
resource, it will consider everything likedomain/attachments/whateverto beshowaction for thewhateverstuff.So two choices here:
define your other routes and declare them before the
resourcenest your other routes inside the
resource(I don’t know how to do that in Rails 2.x)