37 lines
706 B
Ruby
37 lines
706 B
Ruby
|
Rails.application.routes.draw do
|
||
|
|
||
|
locales = Site.first.in_use_locales rescue I18n.available_locales
|
||
|
|
||
|
scope "(:locale)", locale: Regexp.new(locales.join("|")) do
|
||
|
namespace :admin do
|
||
|
resources :surveys do
|
||
|
collection do
|
||
|
get 'delete'
|
||
|
end
|
||
|
member do
|
||
|
get 'export'
|
||
|
get 'set_answers'
|
||
|
get 'jump'
|
||
|
get 'duplicate_it'
|
||
|
end
|
||
|
resources :answers, :controller => :surveys_answers do
|
||
|
collection do
|
||
|
get 'delete'
|
||
|
end
|
||
|
end
|
||
|
end
|
||
|
end
|
||
|
|
||
|
resources :surveys do
|
||
|
collection do
|
||
|
get ':slug_title-:uid', to: 'surveys#show'
|
||
|
end
|
||
|
member do
|
||
|
get 'result'
|
||
|
end
|
||
|
end
|
||
|
|
||
|
end
|
||
|
|
||
|
end
|