Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test activerecord/lib/test/relations_test.rb:reverse_sql_order fails because 'reverse' is not defined as an instance method of Arel::Nodes::Ordering #1865

Closed
wants to merge 1 commit into from

Conversation

mikehoward
Copy link
Contributor

This is monkeypatch to add Arel::Nodes::Ordering#reverse to activerecord/../query_methods.rb
when 'reverse' is called on an instance.

This is clearly the wrong place to do the patch. It should be performed
in a callback when Arel is lazily loaded, but it works and allows
the test to pass (this point)

activrecord/../query_methods.rb

Test activerecord/lib/test/relations_test.rb:reverse_sql_order fails
because 'reverse' is not defined as an instance method of Arel::Nodes::Ordering

This monkey patches Arel::Nodes::Ordering when 'reverse' is called
on an instance.

This is clearly the wrong place to do the patch. It should be performed
in a callback when Arel is lazily loaded, but it works and allows
the test to pass (this point)
@dmathieu
Copy link
Contributor

It is defined.
rails/arel#64

However, a new version of arel needs to be released in order for this to be available.
I don't know when @tenderlove wants to do it. But at that moment, the tests won't be failing anymore.

@mikehoward
Copy link
Contributor Author

thanks. I'm closing this

@mikehoward mikehoward closed this Jun 26, 2011
jake3030 pushed a commit to jake3030/rails that referenced this pull request Jun 28, 2011
…roperly

Signed-off-by: Michael Koziarski <michael@koziarski.com>
[rails#1865 state:committed]
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.

None yet

2 participants