In my routes.rb, I have:
map.resources :users, :member =>
{:edit_business_card => :get,
:update_business_card => :put }
In a view, I can say
<%= update_business_card_url %>
And from my browser, I can post to
http://localhost:3000/users/update_business_card.
But not from script/console:
>> app.update_business_card_user_url
ActionController::RoutingError: update_business_card_user_url failed to
generate from {:controller=>"users",
:action=>"update_business_card"} -
you may have ambiguous routes, or you may need to supply additional
parameters for this route. content_url has the following required
parameters: ["users", :id, "update_business_card"] - are
they all
satisfied?
I don''t actually care about doing this from console, but rspec has the
same
difficulty resolving the route. I''m stumped - url_for is getting the
same
parameters in each case.
Jay Levitt
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---