Skip to content

Instantly share code, notes, and snippets.

@Ruxton
Forked from chintanparikh/gist:2964325
Created June 21, 2012 07:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Ruxton/2964330 to your computer and use it in GitHub Desktop.
Save Ruxton/2964330 to your computer and use it in GitHub Desktop.
PetrescueAdmin::Application.routes.draw do
devise_for :users
root to: redirect("/users/sign_in")
resources :groups, only: [:new, :create, :show]
get 'rescue_directory' => 'groups#index'
get 'rescue_directory/:state' => 'groups#list_by_state'
resources :listings, only: [:index]
resources :blog_posts
namespace :admin do
resources :blog_posts, only: [:index]
resources :users do
resource :notification_settings, only: [:edit, :update], controller: "users/notification_settings"
end
resources :groups, except: [:new, :create], controller: "groups/groups" do
collection do
get :pending
end
member do
put :activate, :setflag
delete :decline
end
resources :log_entries, path: :notes, only: [:new, :create], controller: "groups/notes"
resources :listings, except: [:show], controller: "groups/listings" do
collection do
put :mass_update_status
end
end
resources :users, except: [:show], controller: "groups/users"
end
resources :listings, only: [:index]
resources :users, only: [:index]
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment