Skip to content

Commit

Permalink
Swap return for break in AR callback for Rails 4.1 compatibility
Browse files Browse the repository at this point in the history
rails/rails#12981

This was causing me issues when trying to destroy an instance of a model with a protect block defined.
  • Loading branch information
kamui committed Dec 30, 2013
1 parent 9a6bbb5 commit 17b976a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/protector/adapters/active_record/base.rb
Expand Up @@ -26,7 +26,7 @@ module Base
end

before_destroy do
return true unless protector_subject?
break true unless protector_subject?
destroyable?
end

Expand Down

0 comments on commit 17b976a

Please sign in to comment.