ernie/squeel — Issue #88: Squeel doesn't play nice with to_param
Author: Lauri
Created: 2011-12-19 23:37:41+00:00
State: open

Consider the following query:

`User.find(params[:id])`

Now if you have overwritten `to_param` in your model to get pretty URLs you might end up with this:

`User.find("1-Firstname-Lastname")`

With a stock Rails 3 app this yields:
`SELECT "users".* FROM "users" WHERE "users"."id" = 1 LIMIT 1`

But with Squeel:
`SELECT "users".* FROM "users" WHERE "users"."id" = '1-Some-Name' LIMIT 1`

I.e. Squeel potentially breaks existing apps. Is this expected behavior?