weather/config/routes.rb

21 lines
637 B
Ruby
Raw Normal View History

2021-07-27 08:31:45 +00:00
Rails.application.routes.draw do
locales = Site.first.in_use_locales rescue I18n.available_locales
namespace :admin do
resources :ruling_weathers do
member do
get "edit_setting"
post "update_setting"
patch "update_setting"
end
collection do
get "new_setting"
post "create_setting"
patch "create_setting"
end
end
end
scope "(:locale)", locale: Regexp.new(locales.join("|")) do
post "/xhr/ruling_weather/get_weather_info" => "ruling_weathers#get_weather_info"
get "/xhr/ruling_weather/get_weather_info" => "ruling_weathers#get_weather_info"
end
end