
Querying with string condition keys causes explosions when keys collide with class methods
Reported by Ted Han (knowtheory) | October 12th, 2010 @ 03:59 PM | in 1.1.1
So for instance if i have a property called :name on a model (say Foo), and i try to query with Foo.all("name.like" => "%taco%"), the query will exploooode because Foo.name calls the classmethod and does not return the appropriate property.
Likewise if you define any other class methods which overload a property, the same behavior takes place.
I have attached a simple patch which addresses this specific issue below.
Comments and changes to this ticket
-
Ted Han (knowtheory) October 12th, 2010 @ 04:01 PM
- Tag changed from querying string key conditions to string key conditions, querying
-
Dan Kubb (dkubb) December 8th, 2010 @ 10:40 AM
- Milestone set to 1.1
- State changed from unconfirmed to accepted
- Assigned user set to Dan Kubb (dkubb)
- Milestone order changed from 196300 to 0
-
Dan Kubb (dkubb) March 16th, 2011 @ 10:41 PM
- Milestone changed from 1.1 to 1.1.1
- Milestone order changed from 8 to 0
Please Sign in or create a free account to add a new ticket.
With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile »