A fix for issue #2.

It's not beautiful, but it would work.
And if the Rails core team changes the code to use to_param,
this should remain working.