Looking at various examples on how to define additional actions in map.resources. What I don''t see is do you add them all together or seperate lines. Like: map.resources :positions, :member => {:description => :get} So if I wanted to add :collection => {:search => :get}, do I make a comma and add it in after the description => get or make a new line: mp.resources :positions, :collection => {:search => :get} ? Good question huh ? TIA Stuart -- http://en.wikipedia.org/wiki/Dark_ambient --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
On 10/3/06, Dark Ambient <sambient-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> > Looking at various examples on how to define additional actions in > map.resources. > What I don''t see is do you add them all together or seperate lines. Like: > > map.resources :positions, :member => {:description => :get} > So if I wanted to add :collection => {:search => :get}, do I make a comma > and add it in after the description => get or make a new line: > > mp.resources :positions, :collection => {:search => :get} ?These are options to a single method call declaring a resource, so include them in that call. map.resources :positions, :member => {...}, :collection => {...}, :new => {...}, ... jeremy --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
On 10/3/06, Jeremy Kemper <jeremy-w7CzD/W5Ocjk1uMJSBkQmQ@public.gmane.org> wrote:> > On 10/3/06, Dark Ambient <sambient-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > > Looking at various examples on how to define additional actions in > > map.resources. > > What I don''t see is do you add them all together or seperate lines. > > Like: > > > > map.resources :positions, :member => {:description => :get} > > So if I wanted to add :collection => {:search => :get}, do I make a > > comma and add it in after the description => get or make a new line: > > > > mp.resources :positions, :collection => {:search => :get} ? > > > These are options to a single method call declaring a resource, so include > them in that call. > map.resources :positions, :member => {...}, :collection => {...}, :new > => {...}, ... > > jeremy >Okay , thanks that helps to know. Now if someone call tell me how to add what I guess are non-rest actions to my controller ? Stuart -- http://en.wikipedia.org/wiki/Dark_ambient --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---