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

Fix regression from Rails 3.1 #4715

Merged
merged 1 commit into from
Jan 27, 2012
Merged

Conversation

pwim
Copy link
Contributor

@pwim pwim commented Jan 27, 2012

Under Rails 3.1, you were allowed to pass a hash to a find_or_create
method with multiple attribute names, but this was broken as the
arguments were being improperly validated.

@jonleighton As per #4660, match.is_a?(DynamicFinderMatch) is required as it is only find_or_(create|initialize)_by that accepts a hash. scoped_by requires arguments to be passed individually.

Under Rails 3.1, you were allowed to pass a hash to a find_or_create
method with multiple attribute names, but this was broken as the
arguments were being improperly validated.
@josevalim
Copy link
Contributor

/cc @jonleighton

@jonleighton
Copy link
Member

@josevalim bro I am cc'd in the OP ;)

@josevalim
Copy link
Contributor

My bad.

/cc @jonleighton

jonleighton added a commit that referenced this pull request Jan 27, 2012
@jonleighton jonleighton merged commit f22a0e2 into rails:master Jan 27, 2012
jonleighton added a commit that referenced this pull request Jan 27, 2012
@jonleighton
Copy link
Member

@josevalim I have merged this /cc @josevalim

@jonleighton
Copy link
Member

@josevalim also for 3-2-stable cc @josevalim

@pwim pwim mentioned this pull request Jan 28, 2012
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

3 participants