Skip to content

Commit

Permalink
Commit omission
Browse files Browse the repository at this point in the history
  • Loading branch information
sin authored Aug 19, 2019
1 parent 93cc285 commit 969af54
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion lib/acts_as_taggable_on/taggable/core.rb
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ def #{tag_type}_list=(new_tags)
if Rails.version.to_f < 6.0
set_attribute_was('#{tag_type}_list', #{tag_type}_list)
else
d_mutations_from_database.change_to_attribute('#{tag_type}_list')
duplicated_mutations_from_database.change_to_attribute('#{tag_type}_list')
end
write_attribute("#{tag_type}_list", parsed_new_list)
end
Expand All @@ -69,6 +69,17 @@ def all_#{tags_type}_list
def dirtify_tag_list(tagging)
attribute_will_change! tagging.context.singularize+"_list"
end
def duplicated_mutations_from_database
unless defined?(@mutations_from_database)
@mutations_from_database = nil
end
@mutations_from_database ||= if defined?(@attributes)
ActiveModel::AttributeMutationTracker.new(@attributes)
else
NullMutationTracker.instance
end
end
RUBY
end
end
Expand Down

0 comments on commit 969af54

Please sign in to comment.