Module: ActsAsSeoFriendly::Datable
- Defined in:
- lib/acts_as_seo_friendly/datable.rb,
lib/acts_as_seo_friendly/datable/core.rb,
lib/acts_as_seo_friendly/datable/getters.rb
Defined Under Namespace
Instance Method Summary collapse
Instance Method Details
#acts_as_seo_friendly(format_attribute: :title) ⇒ Object
7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 |
# File 'lib/acts_as_seo_friendly/datable.rb', line 7 def acts_as_seo_friendly(format_attribute: :title) class_eval do # Define association has_one :seo_datum, as: :datable, class_name: '::ActsAsSeoFriendly::SeoDatum', dependent: :destroy def self.seo_friendly? true end end # Include core methods for generating basic data, etc include Core include Getters self.seo_datable_with(format_attribute) end |
#seo_friendly? ⇒ Boolean
3 4 5 |
# File 'lib/acts_as_seo_friendly/datable.rb', line 3 def seo_friendly? false end |