routes.rb revision a5015ca9daa067f062e9e373c3dfafd5631560d9
2ronwalfrequire 'resque/server'
2ronwalf
2ronwalfauth_resque = ->(request) {
2ronwalf request.env['warden'].authenticate? and request.env['warden'].user.admin?
2ronwalf}
2ronwalf
2ronwalfOntohub::Application.routes.draw do
2ronwalf
2ronwalf devise_for :users, :controllers => { :registrations => "users/registrations" }
2ronwalf resources :users, :only => :show
2ronwalf
2ronwalf resources :logics do
2ronwalf resources :supports, :only => [:create, :update, :destroy, :index]
2ronwalf end
2ronwalf
2ronwalf resources :languages do
2ronwalf resources :supports, :only => [:create, :update, :destroy, :index]
2ronwalf end
2ronwalf
2ronwalf resources :language_mappings
2ronwalf resources :logic_mappings
2ronwalf
2ronwalf resources :language_adjoints
2ronwalf resources :logic_adjoints
2ronwalf
2ronwalf resources :serializations
2ronwalf
2ronwalf namespace :admin do
2ronwalf resources :teams, :only => :index
2ronwalf resources :users
2ronwalf end
2ronwalf
2ronwalf constraints auth_resque do
2ronwalf mount Resque::Server, :at => "/admin/resque"
2ronwalf end
2ronwalf
2ronwalf resources :ontologies, only: :show do
2ronwalf resources :children, :only => :index
2ronwalf resources :entities, :only => :index
2ronwalf resources :sentences, :only => :index
2ronwalf resources :ontology_versions, :only => [:index, :show, :new, :create], :path => 'versions' do
2ronwalf resource :oops_request, :only => [:show, :create]
2ronwalf end
2ronwalf
2ronwalf# %w( entities sentences ).each do |name|
2ronwalf# get "versions/:number/#{name}" => "#{name}#index", :as => "ontology_version_#{name}"
2ronwalf# end
2ronwalf
2ronwalf resources :metadata, :only => [:index, :create, :destroy]
2ronwalf resources :comments, :only => [:index, :create, :destroy]
2ronwalf end
2ronwalf
2ronwalf resources :teams do
2ronwalf resources :permissions, :only => [:index], :controller => 'teams/permissions'
2ronwalf resources :team_users, :only => [:index, :create, :update, :destroy], :path => 'users'
2ronwalf end
2ronwalf
2ronwalf get 'autocomplete' => 'autocomplete#index'
2ronwalf get 'search' => 'search#index'
14daenzerorama
14daenzerorama resources :repositories do
14daenzerorama resources :permissions, :only => [:index, :create, :update, :destroy]
14daenzerorama resources :ontologies do
14daenzerorama get 'bulk', :on => :collection
14daenzerorama end
2ronwalf end
2ronwalf
2ronwalf root :to => 'home#show'
2ronwalf
2ronwalfend
2ronwalf