gdi / curb-fu

Simple, yet powerful wrapper for taf2's curb (libcurl) library
Other
57 stars 9 forks source link

Renamed to_param method #8

Closed hoverlover closed 13 years ago

hoverlover commented 13 years ago

Like the subject states, I renamed the to_param method to to_param_pair. It was causing problems when using curb-fu within a Rails project. The unless check you added caused it not to clobber the Rails method, but the side-effect was that it didn't define the to_param method at all. So when Parameter#to_param was called, it was calling the Rails method defined in Object, which doesn't accept a parameter.

I created a branch named rails for this fix in case you didn't want to merge the change into master. I would recommend merging to master and blowing away the rails branch, however, so you don't have to worry about porting new development to the rails branch in order for us Rails guys to keep enjoying CurbFu!

BTW, my commit message isn't exactly accurate. The to_param method doesn't clobber the Rails method. Feel free to edit it when you merge it in.

hypomodern commented 13 years ago

Thanks! I've merged this in.

hoverlover commented 13 years ago

Great, thanks! When do you think it will be pushed to rubygems.org?

hypomodern commented 13 years ago

It should be out now. Version 0.6, apparently 0.5 was never pushed :).

hoverlover commented 13 years ago

Thanks!