Sha256: 5c96beb88b35eda66c06d60c6d892d933515b5a0fa413c6167000f23fa659995

Contents?: true

Size: 307 Bytes

Versions: 1

Compression:

Stored size: 307 Bytes

Contents

Spree::BaseController.class_eval do

  before_filter :get_pages
  helper_method :current_page
  
  def current_page
    @page ||= Spree::Page.find_by_path(request.fullpath)
  end
  
  def get_pages
    return if request.path =~ /^\/+admin/
    @pages ||= Spree::Page.visible.order(:position).all
  end

end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
spree_essential_cms-0.4.0 app/controllers/spree/base_controller_decorator.rb