noesya/osuny

View on GitHub
app/models/communication/website/permalink/page.rb

Summary

Maintainability
A
0 mins
Test Coverage
D
62%
class Communication::Website::Permalink::Page < Communication::Website::Permalink

  # /notre-institut/histoire/
  def self.pattern_in_website(website, language)
    '/:slug_with_ancestors_slugs/'
  end

  protected

  def published?
    website.id == about.communication_website_id && about.published
  end

  def substitutions
    {
      slug_with_ancestors_slugs: about.slug_with_ancestors_slugs
    }
  end

end