personal_plugin_generator/config/routes.rb

14 lines
650 B
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'
end
end
end
end