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.
Like the subject states, I renamed the
to_param
method toto_param_pair
. It was causing problems when using curb-fu within a Rails project. Theunless
check you added caused it not to clobber the Rails method, but the side-effect was that it didn't define theto_param
method at all. So whenParameter#to_param
was called, it was calling the Rails method defined inObject
, 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.