routes.rb revision a0b65fd7d17589196751bea546f738c3534c4fac
1337N/Arequire 'resque/server'
1337N/A
1337N/Aauth_resque = ->(request) {
1337N/A request.env['warden'].authenticate? and request.env['warden'].user.admin?
1337N/A}
0N/A
0N/AOntohub::Application.routes.draw do
0N/A
1298N/A devise_for :users, :controllers => { :registrations => "users/registrations" }
1298N/A resources :users, :only => :show
1298N/A resources :logics do
1298N/A resources :supports, :only => [:create, :update, :destroy, :index]
1298N/A end
1298N/A resources :languages do
1298N/A resources :supports, :only => [:create, :update, :destroy, :index]
1298N/A end
1298N/A
1298N/A namespace :admin do
1298N/A resources :logics, :except => [:show]
1298N/A resources :teams, :only => :index
1298N/A resources :users
1298N/A end
1298N/A
0N/A constraints auth_resque do
0N/A mount Resque::Server, :at => "/admin/resque"
0N/A end
1298N/A
0N/A resources :ontologies do
1298N/A resources :children, :only => :index
1298N/A resources :entities, :only => :index
1298N/A resources :sentences, :only => :index
0N/A get 'bulk', :on => :collection
1298N/A resources :ontology_versions, :only => [:index, :show, :new, :create], :path => 'versions'
1298N/A
1298N/A# %w( entities sentences ).each do |name|
1298N/A# get "versions/:number/#{name}" => "#{name}#index", :as => "ontology_version_#{name}"
1298N/A# end
1073N/A
1298N/A resources :permissions, :only => [:index, :create, :update, :destroy]
0N/A resources :metadata, :only => [:index, :create, :destroy]
1298N/A resources :comments, :only => [:index, :create, :destroy]
1298N/A end
0N/A
0N/A resources :teams do
115N/A resources :permissions, :only => [:index], :controller => 'teams/permissions'
115N/A resources :team_users, :only => [:index, :create, :update, :destroy], :path => 'users'
1298N/A end
1298N/A
1298N/A get 'autocomplete' => 'autocomplete#index'
1298N/A get 'search' => 'search#index'
1298N/A
1337N/A root :to => 'home#show'
1298N/A
0N/Aend
1298N/A