Just realized you'd asked for routes...  here's what I have (showing 
just those for cancel closing...can post others if you wish).

cancel_closing POST   /closing/cancel 
{:controller=>"closings", :action=>"cancel"}

formatted_cancel_closing POST   /closing/cancel.:format 
{:controller=>"closings", :action=>"cancel"}


in my routes.rb I have the line for adding the method as
map.resources :closings, :member => { :cancel => :post }, :requirements 
=> {:protocol => ROUTES_PROTOCOL}

Hope that helps give a bit more context.

-David

David Colwell wrote:
> I'm having a similar issue.
> 
> I have a controlle/model
> in for Appointment with a new action :cancel
> 
> When I create a link_to tag (tried may different ways...assigning 
> cancel_appointment_path(appointment) and assigning :controller => 
> :appointment, :action => :cancel, id: => appointment.id ), but I'm 
> getting an error no matter how I  try.  Assuming we're using an 
> appointment with id 7.. I get a path /appointments/7/cancel and an error 
> saying action "7" not found...logs show it's looking for action 7 and 
> trying to pass in id of "cancel".
> 
> Any advice would be greatly appreciated!!!
> 
> Thx.  -David
> 
> Franz Strebel wrote:
>> On Mon, Jan 19, 2009 at 4:12 PM, Raimon Fs
>> <[email protected]> wrote:
>>>
>>> What can be wrong ???
>> 
>> Can you post the result of rake routes ?

-- 
Posted via http://www.ruby-forum.com/.

--~--~---------~--~----~------------~-------~--~----~
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 [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