On Sunday, October 30, 2011 9:31:50 PM UTC-4, John Merlino wrote:
get "send_activation_notification"
=> :send_activation_notification, :as => "send_activation" do
resources :users do
resources :accounts
end
end
But it doesn't work for me. Note that send_activation_notification is
not a restful route, so I couldnt model my code exactly as shown in
the rails book.
That's not a valid route at all. I think you might have it backwards. Check out the results of "rake routes" if you need to see what all your routes look like.
Instead of this:
get "send_activation_notification" => :send_activation_notification, :as => "send_activation" do
resources :users do
resources :accounts
end
end
You might want to do something like this:
resources :users do
get 'send_activation_notification', :on => :member
resources :accounts
end
Then you will have a send_activation_notification_user route that you can use.