Class: Para::SeoTools::Page
- Inherits:
-
ActiveRecord::Base
- Object
- ActiveRecord::Base
- Para::SeoTools::Page
- Defined in:
- app/models/para/seo_tools/page.rb
Constant Summary collapse
- META_TAGS =
:title, :description, :keywords, :image, :canonical
Instance Method Summary collapse
Instance Method Details
#default(name) ⇒ Object
21 22 23 |
# File 'app/models/para/seo_tools/page.rb', line 21 def default(name) process(name, defaults[name.to_s]) if defaults[name.to_s] end |
#defaults ⇒ Object
13 14 15 16 17 18 19 |
# File 'app/models/para/seo_tools/page.rb', line 13 def defaults if (hash = read_attribute(:defaults)) hash else self.defaults = {} end end |
#meta_tag(name) ⇒ Object
9 10 11 |
# File 'app/models/para/seo_tools/page.rb', line 9 def (name) process(name, send(name)).presence || default(name) end |