Skip to content

Commit

Permalink
Fix deprecation warning
Browse files Browse the repository at this point in the history
  • Loading branch information
rbritom committed Jul 2, 2016
1 parent 95f7430 commit 62e4a6f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/acts_as_taggable_on/taggable/ownership.rb
Original file line number Diff line number Diff line change
Expand Up @@ -108,9 +108,9 @@ def save_owned_tags

# Find all taggings that belong to the taggable (self), are owned by the owner,
# have the correct context, and are removed from the list.
ActsAsTaggableOn::Tagging.destroy_all(taggable_id: id, taggable_type: self.class.base_class.to_s,
tagger_type: owner.class.base_class.to_s, tagger_id: owner.id,
tag_id: old_tags, context: context) if old_tags.present?
ActsAsTaggableOn::Tagging.where(taggable_id: id, taggable_type: self.class.base_class.to_s,
tagger_type: owner.class.base_class.to_s, tagger_id: owner.id,
tag_id: old_tags, context: context).destroy_all if old_tags.present?

# Create new taggings:
new_tags.each do |tag|
Expand Down

0 comments on commit 62e4a6f

Please sign in to comment.