X-Git-Url: https://git.njae.me.uk/?a=blobdiff_plain;f=config%2Froutes.rb;fp=config%2Froutes.rb;h=4a837c0969024b8c26ce30d275a9ad026a41608d;hb=36d9f3351a3b4e8159279445190e2287ffdea86c;hp=75eb181d1231adf4e45cdfed1e927f47412d52f4;hpb=913cf6054b1d29b5d2f5e620304af7ee77cc1f1f;p=feedcatcher.git diff --git a/config/routes.rb b/config/routes.rb index 75eb181..4a837c0 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -1,61 +1,56 @@ -ActionController::Routing::Routes.draw do |map| +Feedcatcher::Application.routes.draw do # The priority is based upon order of creation: first created -> highest priority. + # See how all your routes lay out with "rake routes". + + # You can have the root of your site routed with "root" + # root 'welcome#index' + + # Example of regular route: + # get 'products/:id' => 'catalog#view' + + # Example of named route that can be invoked with purchase_url(id: product.id) + # get 'products/:id/purchase' => 'catalog#purchase', as: :purchase + + # Example resource route (maps HTTP verbs to controller actions automatically): + # resources :products + + # Example resource route with options: + # resources :products do + # member do + # get 'short' + # post 'toggle' + # end + # + # collection do + # get 'sold' + # end + # end - # Sample of regular route: - # map.connect 'products/:id', :controller => 'catalog', :action => 'view' - # Keep in mind you can assign values other than :controller and :action - - # Sample of named route: - # map.purchase 'products/:id/purchase', :controller => 'catalog', :action => 'purchase' - # This route can be invoked with purchase_url(:id => product.id) - - # Sample resource route (maps HTTP verbs to controller actions automatically): - # map.resources :products - - # Sample resource route with options: - # map.resources :products, :member => { :short => :get, :toggle => :post }, :collection => { :sold => :get } - - # Sample resource route with sub-resources: - # map.resources :products, :has_many => [ :comments, :sales ], :has_one => :seller - - # Sample resource route with more complex sub-resources - # map.resources :products do |products| - # products.resources :comments - # products.resources :sales, :collection => { :recent => :get } + # Example resource route with sub-resources: + # resources :products do + # resources :comments, :sales + # resource :seller # end - # Sample resource route within a namespace: - # map.namespace :admin do |admin| - # # Directs /admin/products/* to Admin::ProductsController (app/controllers/admin/products_controller.rb) - # admin.resources :products + # Example resource route with more complex sub-resources: + # resources :products do + # resources :comments + # resources :sales do + # get 'recent', on: :collection + # end # end - map.index 'index.:format', - :conditions => { :method => :get }, - :controller => 'feed', - :action => 'index' - map.feed ':feed_name.:format', - :conditions => { :method => :get }, - :controller => 'feed', - :action => 'show' - map.update '*ignored', - :conditions => { :method => :post }, - #:defaults => { :ignored => nil }, - :controller => 'feed', - :action => 'update' - - map.connect '*ignored', - :controller => 'feed', - :action => 'index' - - # You can have the root of your site routed with map.root -- just remember to delete public/index.html. - map.root :controller => "feed" - - # See how all your routes lay out with "rake routes" - - # Install the default routes as the lowest priority. - # Note: These default routes make all actions in every controller accessible via GET requests. You should - # consider removing the them or commenting them out if you're using named routes and resources. -# map.connect ':controller/:action/:id' -# map.connect ':controller/:action/:id.:format' + # Example resource route with concerns: + # concern :toggleable do + # post 'toggle' + # end + # resources :posts, concerns: :toggleable + # resources :photos, concerns: :toggleable + + # Example resource route within a namespace: + # namespace :admin do + # # Directs /admin/products/* to Admin::ProductsController + # # (app/controllers/admin/products_controller.rb) + # resources :products + # end end