Fix .update_all and .delete_all when using a condition on a joined table in a default_scope #8994

Merged
merged 1 commit into from Jan 18, 2013

Conversation

Projects
None yet
2 participants
Contributor

derekkraan commented Jan 18, 2013

cc @jonleighton

Here's the first commit from #8473.

@derekkraan derekkraan Fix .update_all and .delete_all when using a condition on a joined table
in a default_scope.

`Model.joins(...).where(condition_on_joined_table).update_all` /
`delete_all` worked, but the same operation implemented with a
default_scope generated a SQL error because ActiveRecord ignored the
join but implemented the where condition anyways.
bc4edca

jonleighton merged commit 40e7978 into rails:master Jan 18, 2013

derekkraan deleted the Springest:fix_default_scope_update_all_delete_all branch Jan 18, 2013

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