In your routes.db, put something like this:
map.resources :projects do |projects|
projects.resources :chat_messages, :collection => { :show_recent
=> :get}
end
You can call your function using:
show_recent_project_chat_messages_path(@project)
... it''s beautiful :)
Martijn
On Oct 4, 2:26 pm, Tarscher
<tarsc...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
wrote:> Hi all,
>
> I want to make acustommethod in myrestfulusers controller. The
> method ''activate'', activates and finalizes the signup
proces of a
> user.
>
> The method should get the id and the activation code of the user
> (provided via the link in the mail) and see if it matches. the user
> should be send to the activation view.
>
> Can someone tell me how I make thiscustommethod? I defined the
> activate method in the controller and have added something like
> map.resources :users, :member => { :activate => :get}
> to myroutes
>
> I really don''t know wether I should take the get, post or put (and
> what they actually mean).
>
> maybe someone can clarify this?
>
> many thanks
> Stijn
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---