personal_plugin_generator/config/routes.rb

20 lines
1.0 KiB
Ruby

Rails.application.routes.draw do
locales = Site.find_by(site_active: true).in_use_locales rescue I18n.available_locales
scope "(:locale)", locale: Regexp.new(locales.join("|")) do
namespace :admin do
resources :personal_plugin_fields do
get 'fields_setting' , to: 'personal_plugin_fields#fields_setting'
post 'update_fields_setting' , to: 'personal_plugin_fields#update_fields_setting'
patch 'update_fields_setting' , to: 'personal_plugin_fields#update_fields_setting'
get 'generate_plugin' , to: 'personal_plugin_fields#generate_plugin'
get 'copy' , to: 'personal_plugin_fields#copy'
get 'download' , to: 'personal_plugin_fields#download'
end
resource :personal_plugin_field do
post 'check_plugin_exist' ,to: 'personal_plugin_fields#check_plugin_exist'
post 'check_modal_name' ,to: 'personal_plugin_fields#check_modal_name'
end
end
end
end