Sha256: 4fea5d523d68148b8b6f8c3af25ade0b2500fda14682629287abce6eec4fedb2
Contents?: true
Size: 847 Bytes
Versions: 3
Compression:
Stored size: 847 Bytes
Contents
class 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 = Page.active.where(:path => path).count 0 < count end end Rails.application.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(PossiblePage) do get '(:page_path)', :to => 'pages#show', :page_path => /.*/, :as => :page end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
spree_essential_cms-0.1.2 | config/routes.rb |
spree_essential_cms-0.2.1 | config/routes.rb |
spree_essential_cms-0.2.0 | config/routes.rb |