Prepare to support ruby 3.3.
This commit is contained in:
parent
d49edd789e
commit
3001b51332
|
@ -1,35 +1,37 @@
|
|||
module AdBanner
|
||||
class Engine < ::Rails::Engine
|
||||
initializer "ad_banner" do
|
||||
OrbitApp.registration "AdBanner", :type => "ModuleApp" do
|
||||
module_label "ad_banner.ad_banner"
|
||||
base_url File.expand_path File.dirname(__FILE__)
|
||||
widget_methods ["widget"]
|
||||
widget_settings [{"override_category_with"=>"banner","multiselect"=>false,"display_field"=>"title","enable_custom_widget_data"=>true}]
|
||||
# models_to_cache [:banner,:ad_image]
|
||||
taggable "Banner"
|
||||
categorizable
|
||||
authorizable
|
||||
Rails.application.config.to_prepare do
|
||||
OrbitApp.registration "AdBanner", :type => "ModuleApp" do
|
||||
module_label "ad_banner.ad_banner"
|
||||
base_url File.expand_path File.dirname(__FILE__)
|
||||
widget_methods ["widget"]
|
||||
widget_settings [{"override_category_with"=>"banner","multiselect"=>false,"display_field"=>"title","enable_custom_widget_data"=>true}]
|
||||
# models_to_cache [:banner,:ad_image]
|
||||
taggable "Banner"
|
||||
categorizable
|
||||
authorizable
|
||||
|
||||
side_bar do
|
||||
head_label_i18n 'ad_banner.ad_banner', icon_class: "icons-landscape"
|
||||
available_for "users"
|
||||
active_for_controllers (['admin/ad_banners','admin/ad_images'])
|
||||
head_link_path "admin_ad_banners_path"
|
||||
side_bar do
|
||||
head_label_i18n 'ad_banner.ad_banner', icon_class: "icons-landscape"
|
||||
available_for "users"
|
||||
active_for_controllers (['admin/ad_banners','admin/ad_images'])
|
||||
head_link_path "admin_ad_banners_path"
|
||||
|
||||
context_link 'ad_banner.all',
|
||||
:link_path=>"admin_ad_banners_path" ,
|
||||
:priority=>1,
|
||||
:active_for_action=>{'admin/ad_banners'=>"index"},
|
||||
:available_for => 'users'
|
||||
context_link 'ad_banner.all',
|
||||
:link_path=>"admin_ad_banners_path" ,
|
||||
:priority=>1,
|
||||
:active_for_action=>{'admin/ad_banners'=>"index"},
|
||||
:available_for => 'users'
|
||||
|
||||
context_link 'categories',
|
||||
:link_path=>"admin_module_app_categories_path" ,
|
||||
:link_arg=>"{:module_app_id=>ModuleApp.find_by(:key=>'ad_banner').id}",
|
||||
:priority=>3,
|
||||
:active_for_action=>{'admin/ad_banners'=>'categories'},
|
||||
:active_for_category => 'AdBanner',
|
||||
:available_for => 'managers'
|
||||
context_link 'categories',
|
||||
:link_path=>"admin_module_app_categories_path" ,
|
||||
:link_arg=>"{:module_app_id=>ModuleApp.find_by(:key=>'ad_banner').id}",
|
||||
:priority=>3,
|
||||
:active_for_action=>{'admin/ad_banners'=>'categories'},
|
||||
:active_for_category => 'AdBanner',
|
||||
:available_for => 'managers'
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue