Module: Seofy::ActiveRecord::InstanceMethods
- Defined in:
- lib/seofy/active_record.rb
Instance Method Summary collapse
- #seofy_after_create ⇒ Object
- #seofy_before_create ⇒ Object
- #seofy_param ⇒ Object
- #seofy_slug ⇒ Object
- #seofy_source ⇒ Object
Instance Method Details
#seofy_after_create ⇒ Object
50 51 52 |
# File 'lib/seofy/active_record.rb', line 50 def seofy_after_create self.class.seofy_adapter.after_create(self) end |
#seofy_before_create ⇒ Object
46 47 48 |
# File 'lib/seofy/active_record.rb', line 46 def seofy_before_create self.class.seofy_adapter.before_create(self) end |
#seofy_param ⇒ Object
34 35 36 |
# File 'lib/seofy/active_record.rb', line 34 def seofy_param [seofy_source.to_s, seofy_slug].join("-").to_slug.normalize.to_s end |
#seofy_slug ⇒ Object
38 39 40 |
# File 'lib/seofy/active_record.rb', line 38 def seofy_slug self.class.seofy_adapter.seofy_slug(self) end |
#seofy_source ⇒ Object
42 43 44 |
# File 'lib/seofy/active_record.rb', line 42 def seofy_source self.send(self.class.seofy_config.source).to_s end |