Sha256: a4da241bfeb1fe869dc8aef1d633633f7caad0015d1a87a45e24ed464d8998cf

Contents?: true

Size: 307 Bytes

Versions: 1

Compression:

Stored size: 307 Bytes

Contents

Spree::BaseController.class_eval do

  before_filter :get_pages

  def get_pages
    admin = request.path =~ /^\/admin/
    @page = Spree::Page.find_by_path(request.path) rescue nil unless admin
    scope = admin ? Spree::Page.scoped : Spree::Page.visible
    @pages = scope.order(:position).all
  end

end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
spree_essential_cms-0.3.0.rc1 app/controllers/spree/spree_base_controller_decorator.rb