Sha256: 04682ca7037555321fd762e70f3e8a7c8f21c7ff1ac24467c620dfcae6db7c3c

Contents?: true

Size: 427 Bytes

Versions: 5

Compression:

Stored size: 427 Bytes

Contents

module Admin::PagesHelper
  include Admin::NodeHelper
  include Admin::ReferencesHelper

  def class_of_page
    @page.class
  end

  def filter
    @page.parts.first.filter if @page.parts.respond_to?(:any?) && @page.parts.any?
  end

  def meta_errors?
    !!(@page.errors[:slug] or @page.errors[:breadcrumb])
  end

  def clean_page_description(page)
    page.description.to_s.strip.gsub(/\t/, '').gsub(/\s+/, ' ')
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
trusty-cms-7.0.8 app/helpers/admin/pages_helper.rb
trusty-cms-7.0.7 app/helpers/admin/pages_helper.rb
trusty-cms-7.0.6 app/helpers/admin/pages_helper.rb
trusty-cms-7.0.5 app/helpers/admin/pages_helper.rb
trusty-cms-7.0.4 app/helpers/admin/pages_helper.rb