Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Removed alias_method_chain from instance_methods
  • Loading branch information
sjoulbak committed Jun 27, 2017
1 parent 6ff0165 commit f3b9091
Showing 1 changed file with 5 additions and 8 deletions.
13 changes: 5 additions & 8 deletions lib/seo_meta/instance_methods.rb
Expand Up @@ -10,19 +10,16 @@ def seo_meta
end

# Allow attributes supplied to override the current seo_meta_attributes.
def attributes_with_seo_meta
seo_meta_attributes.merge(attributes_without_seo_meta)
def attributes
seo_meta_attributes.merge(super)
end

alias_method_chain :attributes, :seo_meta

def attributes_equals_with_seo_meta(attributes, *args)
def attributes_equals(attributes, *args)
seo_meta_attributes.merge(attributes)
attributes_equals_without_seo_meta
super
end

alias_method :attributes_equals, :attributes=
alias_method_chain :attributes_equals, :seo_meta
end
end
end
Expand All @@ -48,4 +45,4 @@ def save_meta_tags!
seo_meta.save
end
end
end
end

0 comments on commit f3b9091

Please sign in to comment.