Skip to content

Fixed AR::Relation#group method when argument is a SQL reserved keyword #18722

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

Merged
merged 1 commit into from
Jan 29, 2015

Conversation

bogdan
Copy link
Contributor

@bogdan bogdan commented Jan 29, 2015

Fixed ActiveRecord::Relation#group method when argument is SQL reserved key word:

SplitTest.group(:key).count
Property.group(:value).count

Bonus: removed unnecessary argument for build_select

@bogdan bogdan force-pushed the group-by-key-word branch from 5243d97 to e94330f Compare January 29, 2015 15:27
rafaelfranca added a commit that referenced this pull request Jan 29, 2015
Fixed AR::Relation#group method when argument is a SQL reserved keyword
@rafaelfranca rafaelfranca merged commit 6296c09 into rails:master Jan 29, 2015
rafaelfranca added a commit that referenced this pull request Jan 29, 2015
Fixed AR::Relation#group method when argument is a SQL reserved keyword
Conflicts:
	activerecord/CHANGELOG.md
	activerecord/lib/active_record/relation/query_methods.rb
@bogdan
Copy link
Contributor Author

bogdan commented Jan 29, 2015

Maybe it was a regression at some point but I didn't analyse that. Maybe requires backport.

@rafaelfranca
Copy link
Member

Backported as 0662db1 and e0ebfad

rafaelfranca added a commit that referenced this pull request Jan 29, 2015
Fixed AR::Relation#group method when argument is a SQL reserved keyword
Conflicts:
	activerecord/CHANGELOG.md
	activerecord/lib/active_record/relation/query_methods.rb
@mfazekas
Copy link
Contributor

@bogdan This patch caused a regression with subselects from. Can you please reivew #18743 and related PR?

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