#routes.rb
scope 'planbadmin' do
resources :timezone do
member do
post :set
end
end
end
That's your problem there. By putting the "set" method under member, it's
expecting it to be called for a timezone such as "/timezone/:id/set"
If you're going to set it up as a resource in routes, you probably want to
use "collection" instead of "member" so it can be accessed via
"/timezone/set"
You can run "rake routes" from the command line and you can see what it is
expecting.
Of course the other option is just to add this one line to your routes
instead of the resources snippet above:
post "timezone/set"
--
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/-/Npun_cjsYuAJ.
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.