Project

General

Profile

« Previous | Next » 

Revision 2807589b

Added by Corey Osman almost 12 years ago

  • ID 2807589bd5fc7f5d5d9cf00606181fa9b9136971

split api routes to separate routes file

View differences:

config/routes.rb
resources :tasks, :only => [:show]
#### API Namespace from here downwards ####
restapi
namespace :api, :defaults => {:format => 'json'} do
scope :module => :v1, :constraints => ApiConstraints.new(:version => 1, :default => true) do
resources :bookmarks, :except => [:new, :edit]
resources :architectures, :except => [:new, :edit]
resources :operatingsystems, :except => [:new, :edit] do
member do
get 'bootfiles'
end
end
match '/', :to => 'home#index'
match 'status', :to => 'home#status', :as => "status"
end
# scope module: :v2, constraints: ApiConstraints.new(version: 2, default: true) do
# resources :bookmarks
# end
end
#Keep this line the last route
match '*a', :to => 'errors#routing'

Also available in: Unified diff