Skip to content

Commit

Permalink
Revert the last two commits
Browse files Browse the repository at this point in the history
  • Loading branch information
mlandauer committed Sep 6, 2012
1 parent fe95a8b commit e4f0456
Showing 1 changed file with 9 additions and 18 deletions.
27 changes: 9 additions & 18 deletions config/routes.rb
Original file line number Diff line number Diff line change
@@ -1,20 +1,4 @@
PlanningalertsApp::Application.routes.draw do
# API routes
resources :applications, :only => :index
resources :authorities, :only => [] do
resources :applications, :only => :index do
collection do
get :per_day
get :per_week
end
end
end

# Everything after here will get redirected if accessed on the api subdomain
constraints :subdomain => "api" do
match "(*path)" => redirect {|p,r| "http://www.#{r.domain(2)}/#{p[:path]}"}
end

ActiveAdmin.routes(self)

devise_for :users, ActiveAdmin::Devise.config
Expand All @@ -41,7 +25,7 @@
end
end

resources :applications, :only => :show do
resources :applications, :only => [:index, :show] do
member do
get :nearby
end
Expand All @@ -55,7 +39,14 @@
resources :reports, :only => [:new, :create]
end

resources :authorities, :only => [:index, :show]
resources :authorities, :only => [:index, :show] do
resources :applications, :only => [:index] do
collection do
get :per_day
get :per_week
end
end
end

match 'api/howto' => 'api#howto', :as => :api_howto
match 'api' => 'api#index', :as => :api
Expand Down

0 comments on commit e4f0456

Please sign in to comment.