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
25 26 27 |
# File 'app/models/para/seo_tools/page.rb', line 25 def default(name) process(name, defaults[name.to_s]) if defaults[name.to_s] end |
#defaults ⇒ Object
17 18 19 20 21 22 23 |
# File 'app/models/para/seo_tools/page.rb', line 17 def defaults if (hash = read_attribute(:defaults)) hash else self.defaults = {} end end |
#meta_tag(name) ⇒ Object
9 10 11 12 13 14 15 |
# File 'app/models/para/seo_tools/page.rb', line 9 def (name) if (value = send(name).presence) && ( = process(name, value)).present? return end default(name) end |