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.
 

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/rubyonrails-talk/-/xspDQecxa7gJ.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.

Reply via email to