Module: Kms::Permalinkable
- Extended by:
- ActiveSupport::Concern
- Defined in:
- app/models/concerns/kms/permalinkable.rb
Instance Method Summary collapse
-
#permalink ⇒ Object
Entity should respond to “slug”.
Instance Method Details
#permalink ⇒ Object
Entity should respond to “slug”
6 7 8 9 10 11 |
# File 'app/models/concerns/kms/permalinkable.rb', line 6 def permalink templatable_page = Kms::Page.where(templatable_type: self.class.name).first if templatable_page Pathname.new(templatable_page.parent.fullpath).join(slug.to_s).to_s end end |