config/routes.rb in mega_bar-0.0.1 vs config/routes.rb in mega_bar-0.5.1
- old
+ new
@@ -1,30 +1,18 @@
-MegaBar::Engine.routes.draw do
- resources :tests
+Rails.application.routes.draw do
+ MegaBar::Engine.routes.draw do
- resources :testers
+ MegaRoute.load('/mega-bar').each do |route|
+ get '/template_sections_for_layout/:id', to: 'utils#by_layout'
+ # puts "MB: HEY: #{route[:path]} => #{route[:controller]}##{route[:action]} via #{route[:method]} as: #{route[:as]}" # if route[:path].include?('models') || route[:path].include?('survey')
+ # puts route;
+ # if route[:concerns] == 'paginatable'
+ # # puts("#{route[:path]}(/#{route[:controller].singularize}_page/:page)")
+ # match "#{route[:path]}(/#{route[:controller].singularize}_page/:page)" => "#{route[:controller]}##{route[:action]}", via: route[:method], as: route[:as], :page => 1
+ # else
+ match route[:path] => "#{route[:controller]}##{route[:action]}", via: route[:method], as: route[:as]
+ # end
+ end
+ end
- resources :selects
-
- resources :field_displays
-
- resources :fields
-
- resources :textboxes
-
- resources :textreads
-
- resources :records_formats
-
- resources :attribute_displays
-
- resources :model_displays
-
- resources :attributes
-
- resources :models
-
- resources :tmp_models
-
- resources :tmp_fields
end