Skip to content

Conversation

@gmcgibbon
Copy link
Member

Summary

Fixes #34752.

Allows ActionController::Params as argument of ActiveRecord::Base#exists?. This works already for #create and #where, so I think this change makes sense.

Copy link
Member

Choose a reason for hiding this comment

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

Am I missing something or this test is not using Parameters?

Copy link
Member Author

Choose a reason for hiding this comment

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

🤦‍♂️ My bad, fixed now.

Allow `ActionController::Params` as argument of
`ActiveRecord::Base#exists?`
@kaspth
Copy link
Contributor

kaspth commented Jan 7, 2019

I thought we had deprecated exists? without arguments?

@rafaelfranca
Copy link
Member

I thought we had deprecated exists? without arguments?

Not that I'm aware. Why would we do that?

@kaspth
Copy link
Contributor

kaspth commented Jan 8, 2019

I can't for the life of me find that discussion now via GitHub's search. I just seem to remember @matthewd and either @eugeneius and @kamipo talking about this.

@rafaelfranca rafaelfranca merged commit fcd38cf into rails:master Jan 14, 2019
@gmcgibbon gmcgibbon deleted the ac_params_exists branch January 14, 2019 22:35
bogdanvlviv added a commit to bogdanvlviv/rails that referenced this pull request Jan 17, 2019
suketa added a commit to suketa/rails_sandbox that referenced this pull request Jul 13, 2019
Allow strong params in ActiveRecord::Base#exists?
rails/rails#34891
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants