config/routes.rb in mcms_pages-0.0.4 vs config/routes.rb in mcms_pages-0.0.5
- old
+ new
@@ -20,10 +20,12 @@
#root :to => "pages#home"
# post to page preview action
post 'pages/preview' => 'pages#preview', :as => :preview_pages
+ match 'pages/blog/preview' => redirect("/blog/posts") if Gem.available?("mcms_blog")
+
# match pages/**/preview to action preview of pages controller
match 'pages/*path/preview' => 'pages#preview', :as => :preview_page, :via => [:get, :put]
# define route for namespace admin for different resources to have
# path prefixed with "mcms"
@@ -35,10 +37,18 @@
# get edit path for parent and child(url prepended with parent) page both
# and redirect to edit action
get 'pages/*path/edit', :to => 'pages#edit'
- resources :layouts
+ resources :layouts do
+
+ collection do
+
+ get 'find_and_use_layout'
+
+ end
+
+ end
resources :pages do
collection do