survey/config/routes.rb

48 lines
1.0 KiB
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
get "surveys/checkforthread", to: "surveys#checkforthread"
resources :surveys do
collection do
get 'delete'
end
member do
get 'export'
get 'set_answers'
get 'set_sections'
get 'add_section'
get 'pagination_setting'
patch 'save_pagination_setting'
post 'create_section'
delete 'delete_section'
get 'edit_section'
patch 'update_section'
get 'jump'
get 'duplicate_it'
get 'answer_sets'
get 'answer_set'
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