Sha256: 5c153dd27e54c141284ce4eec7b25b43893d33cf25b1c7195bea644174087e79
Contents?: true
Size: 867 Bytes
Versions: 1
Compression:
Stored size: 867 Bytes
Contents
class Spree::PossiblePage def self.matches?(request) path = request.fullpath return if path =~ /(^\/(admin|account|cart|checkout|content|login|pg\/|orders|products|s\/|session|signup|shipments|states|t\/|tax_categories|user)+)/ count = Spree::Page.active.where(:path => path.gsub("//","/")).count 0 < count end end Spree::Core::Engine.routes.draw do namespace :admin do resources :pages do collection do post :update_positions end resources :contents do collection do post :update_positions end end resources :images, :controller => "page_images" do collection do post :update_positions end end end end constraints(Spree::PossiblePage) do get '(:page_path)', :to => 'pages#show', :page_path => /.*/, :as => :page end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
spree_essential_cms-0.3.0.rc1 | config/routes.rb |