<%= link_to “New”, { :controller => :threads, :action=>:new_requirement
} %>
When I click on the link it displays the error page:
Unknown action
No action responded to show
Why is this? Thanks!
<%= link_to “New”, { :controller => :threads, :action=>:new_requirement
} %>
When I click on the link it displays the error page:
Unknown action
No action responded to show
Why is this? Thanks!
This can sound stupid, but, ¿Do u define the function :new_requeriment
in you threads controller?
Looks to me that you are using “map.resources :threads” in your
routes.rb and that maps anything with /threads/whatever to :action =>
show, :id => “whatever”.
To get around this, you might want to simply use “new” actoin that’s
mapped by standard when using restful routing. Or, if you really want
“new_requirement”, please consider adding :collection =>
{ :new_requirement => :get } to your resource section in routes.rb.
Sounds to me like requirements are another resource. I recommend
making another controller for requirements if this is so.
routes.rb:
map.resources :users, :threads
I still get the same error.
And I’m not exactly sure what you’re telling me to do Hubert.
Thanks
Ryan B. wrote:
Sounds to me like requirements are another resource. I recommend
making another controller for requirements if this is so.
Hi , justint
Define method or action in ur controller ! and also emphasis on naming
conversation .
<=% link_to “New” :controller => “controller_name”, :action
=>“action_name” ,:id =>@instant_var%>
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.
Sponsor our Newsletter | Privacy Policy | Terms of Service | Remote Ruby Jobs