weather/lib/ruling_weather/engine.rb

34 lines
1.2 KiB
Ruby
Raw Permalink Normal View History

2021-07-27 08:31:45 +00:00
module RulingWeather
class Engine < ::Rails::Engine
initializer "ruling_weather" do
OrbitApp.registration "RulingWeather", :type => "ModuleApp" do
module_label "ruling_weather.ruling_weather"
base_url File.expand_path File.dirname(__FILE__)
authorizable
widget_methods ["widget"]
widget_settings [{"override_category_with"=>"ruling_weather_setting","multiselect"=>false,"display_field"=>"location"}]
2022-11-24 15:43:17 +00:00
if File.basename($0) != 'rake'
begin
avoid_page_cache RulingWeatherCache
rescue => e
puts ["avoid_page_cache", e.to_s]
end
end
2021-07-27 08:31:45 +00:00
side_bar do
head_label_i18n 'ruling_weather.ruling_weather', icon_class: "fa fa-sun-o"
available_for "users"
active_for_controllers (['admin/ruling_weathers'])
head_link_path "admin_ruling_weathers_path"
context_link 'ruling_weather.setting_management',
:link_path=>"admin_ruling_weathers_path" ,
:priority=>1,
:active_for_action=>{'admin/ruling_weathers'=>'index'},
:available_for => 'managers'
end
end
end
end
end