diff --git a/lib/acts_as_taggable_on/tagging.rb b/lib/acts_as_taggable_on/tagging.rb index 905f8501b..26ed57472 100644 --- a/lib/acts_as_taggable_on/tagging.rb +++ b/lib/acts_as_taggable_on/tagging.rb @@ -6,7 +6,7 @@ class Tagging < ::ActiveRecord::Base #:nodoc: belongs_to :tag, class_name: '::ActsAsTaggableOn::Tag', counter_cache: ActsAsTaggableOn.tags_counter belongs_to :taggable, polymorphic: true - belongs_to :tagger, {polymorphic: true}.tap {|o| o.merge!(optional: true) } + belongs_to :tagger, { polymorphic: true, optional: true } scope :owned_by, ->(owner) { where(tagger: owner) } scope :not_owned, -> { where(tagger_id: nil, tagger_type: nil) }