Hello there, I want to display a help icon and when users click it a simple static page to open in a pop-up. In My View I have: <%= link_to image_tag("info_small.gif") , { :action => "help", :controller => "restaurants"}, :popup => [''new_window'', ''height=300,width=600''] %> In My Controller I have: def help @message = ''hello'' end I have a help.rhtml file with some static text. Every time I click on the image I get the following error in the pop up menu: Couldn''t find Restaurant with ID=help Any Idea whats going on and how I can fix it? Thanks, steve -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Steve Glaz wrote:> Couldn''t find Restaurant with ID=helpThis means you have RESTful routes. By default, the line: map.resources :restaurants means you have just 7 actions available: #index, #new, #create, #edit, #update, #destroy, #show To use more actions, you need to specify them in config/routes.rb with something like: map.resources :restaurants, :collection => {:help => :get} For more info: http://api.rubyonrails.com/classes/ActionController/Resources.html#M000308 -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Thanks for the tip. Seems to work now. Thanks, steve Mark Bush wrote:> Steve Glaz wrote: >> Couldn''t find Restaurant with ID=help > > This means you have RESTful routes. By default, the line: > > map.resources :restaurants > > means you have just 7 actions available: > > #index, #new, #create, #edit, #update, #destroy, #show > > To use more actions, you need to specify them in config/routes.rb with > something like: > > map.resources :restaurants, :collection => {:help => :get} > > For more info: > > http://api.rubyonrails.com/classes/ActionController/Resources.html#M000308-- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---