Prepare to support ruby 3.3.
This commit is contained in:
parent
fff114e183
commit
f8a505911d
|
@ -1,57 +1,59 @@
|
||||||
module Faq
|
module Faq
|
||||||
class Engine < ::Rails::Engine
|
class Engine < ::Rails::Engine
|
||||||
initializer "faq" do
|
initializer "faq" do
|
||||||
OrbitApp.registration "Faq", :type => "ModuleApp" do
|
Rails.application.config.to_prepare do
|
||||||
module_label "faq.faq"
|
OrbitApp.registration "Faq", :type => "ModuleApp" do
|
||||||
base_url File.expand_path File.dirname(__FILE__)
|
module_label "faq.faq"
|
||||||
widget_methods ['widget']
|
base_url File.expand_path File.dirname(__FILE__)
|
||||||
widget_settings [{"data_count"=>30}]
|
widget_methods ['widget']
|
||||||
models_to_cache [:qa]
|
widget_settings [{"data_count"=>30}]
|
||||||
taggable "Qa"
|
models_to_cache [:qa]
|
||||||
categorizable
|
taggable "Qa"
|
||||||
authorizable
|
categorizable
|
||||||
frontend_enabled
|
authorizable
|
||||||
data_count 1..30
|
frontend_enabled
|
||||||
side_bar do
|
data_count 1..30
|
||||||
head_label_i18n 'faq.faq', icon_class: "icons-help"
|
side_bar do
|
||||||
available_for "users"
|
head_label_i18n 'faq.faq', icon_class: "icons-help"
|
||||||
active_for_controllers (['admin/faqs'])
|
available_for "users"
|
||||||
head_link_path "admin_faqs_path"
|
active_for_controllers (['admin/faqs'])
|
||||||
|
head_link_path "admin_faqs_path"
|
||||||
|
|
||||||
context_link 'all',
|
context_link 'all',
|
||||||
:link_path=>"admin_faqs_path" ,
|
:link_path=>"admin_faqs_path" ,
|
||||||
:priority=>1,
|
:priority=>1,
|
||||||
:active_for_action=>{'admin/faqs'=>"index"},
|
:active_for_action=>{'admin/faqs'=>"index"},
|
||||||
:available_for => 'users'
|
:available_for => 'users'
|
||||||
|
|
||||||
context_link 'new_',
|
context_link 'new_',
|
||||||
:link_path=>"new_admin_faq_path" ,
|
:link_path=>"new_admin_faq_path" ,
|
||||||
:priority=>2,
|
:priority=>2,
|
||||||
:active_for_action=>{'admin/faqs'=>"new"},
|
:active_for_action=>{'admin/faqs'=>"new"},
|
||||||
:available_for => 'sub_managers'
|
:available_for => 'sub_managers'
|
||||||
|
|
||||||
context_link 'categories',
|
context_link 'categories',
|
||||||
:link_path=>"admin_module_app_categories_path" ,
|
:link_path=>"admin_module_app_categories_path" ,
|
||||||
:link_arg=>"{:module_app_id=>ModuleApp.find_by(:key=>'faq').id}",
|
:link_arg=>"{:module_app_id=>ModuleApp.find_by(:key=>'faq').id}",
|
||||||
:priority=>3,
|
:priority=>3,
|
||||||
:active_for_action=>{'admin/faqs'=>'categories'},
|
:active_for_action=>{'admin/faqs'=>'categories'},
|
||||||
:active_for_category => 'Faq',
|
:active_for_category => 'Faq',
|
||||||
:available_for => 'managers'
|
:available_for => 'managers'
|
||||||
|
|
||||||
context_link 'faq.order',
|
context_link 'faq.order',
|
||||||
:link_path=>"admin_faqs_order_path" ,
|
:link_path=>"admin_faqs_order_path" ,
|
||||||
:priority=>4,
|
:priority=>4,
|
||||||
:active_for_action=>{'admin/faqs'=>'order'},
|
:active_for_action=>{'admin/faqs'=>'order'},
|
||||||
:available_for => 'managers'
|
:available_for => 'managers'
|
||||||
|
|
||||||
context_link 'tags',
|
context_link 'tags',
|
||||||
:link_path=>"admin_module_app_tags_path" ,
|
:link_path=>"admin_module_app_tags_path" ,
|
||||||
:link_arg=>"{:module_app_id=>ModuleApp.find_by(:key=>'faq').id}",
|
:link_arg=>"{:module_app_id=>ModuleApp.find_by(:key=>'faq').id}",
|
||||||
:priority=>5,
|
:priority=>5,
|
||||||
:active_for_action=>{'admin/faqs'=>'tags'},
|
:active_for_action=>{'admin/faqs'=>'tags'},
|
||||||
:active_for_tag => 'Faq',
|
:active_for_tag => 'Faq',
|
||||||
:available_for => 'managers'
|
:available_for => 'managers'
|
||||||
end
|
end
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue