lib/config/routes.rb in rich_cms-1.0.0 vs lib/config/routes.rb in rich_cms-2.0.0

- old
+ new

@@ -1,17 +1,19 @@ -# Redefine clear! method to do nothing (usually it erases the routes) +# TODO: add routes the right way as this is evil class << ActionController::Routing::Routes;self;end.class_eval do define_method :clear!, lambda {} end +# END ActionController::Routing::Routes.draw do |map| - map.namespace :rich, :path_prefix => "" do |rich| - rich.cms_root "cms", :controller => "cms", :action => "show" - %w(hide login logout update).each do |action| + %w(login logout update).each do |action| rich.send "cms_#{action}", "cms/#{action}", :controller => "cms", :action => action end + rich.cms "cms" , :controller => "cms", :action => "display", :display => true + rich.cms_hide "cms/hide" , :controller => "cms", :action => "display", :display => false + rich.connect "cms/position", :controller => "cms", :action => "position" + end - end \ No newline at end of file