Skip to content

Conversation

@stefanneculai
Copy link
Contributor

range_hash method was failing when the key was a Symbol.

@stefanneculai
Copy link
Contributor Author

The new tests added in this commit fail without this fix. It is related to the change from PR #124

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

While passing 'name' as symbol instead of a string seems natural, "created_at.gt" seems like an extra burden on the caller. I would expect most people would just call it with "created_at.gt" in string form, which is probably what the test should express.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Only that for the tests it has to be called this way because it writes it directly on the query object. When you use Model.where("created_at.gt" => 'whatever') it will make "created_at.gt" symbol in the where method. No one said that it has to be sym when people use them.

@luxx
Copy link

luxx commented Aug 21, 2013

this looks good to me

@mattbornski
Copy link

+1 range queries are really challenging with the symbol/string confusion in this ORM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants