On Fri, Mar 5, 2010 at 6:23 PM, Sven S. <svoop / delirium.ch> wrote:
>> to any of the alternatives that have been suggested since. It's too
>> bad that it doesn't quite do the job for him. Sven, are you sure you
>> absolutely can't tolerate an options hash with a nil value in it?
>
> Yep, I need it with form_for in Rails which doesn't like :method => nil.

If you can't use the resource oriented form of form_for which lets
Rails figure out the method based on whether the resource is new or
existing, then why not handle it on the other side of the interface

def mymethod(options={})
    options[:method] ||= :put
    #...
 end


-- 
Rick DeNatale

Blog: http://talklikeaduck.denhaven2.com/
Twitter: http://twitter.com/RickDeNatale
WWR: http://www.workingwithrails.com/person/9021-rick-denatale
LinkedIn: http://www.linkedin.com/in/rickdenatale