make default widget works without init
This commit is contained in:
1 parent
1856d2395d
commit
a70110f787
7 files changed
+115
-1
No files matched your search
@@ -350,4 +350,10 @@ namespace :migrate do
|
||||
ModuleApp.new.from_json(File.open("#{Rails.root}/vendor/built_in_modules/gallery/gallery.json").read).save
|
||||
end
|
||||
|
||||
task :make_default_widget_work_config => :environment do
|
||||
a = ModuleApp.where(:key=>'announcement').first
|
||||
a.widgets[:default_widget] = ['typeA','typeC','typeB_style2','typeB_style3','typeB_style4']
|
||||
a.widget_fields = ["title","bulletin_category","postdate"]
|
||||
a.save
|
||||
end
|
||||
end
|
||||
Reference in new issue
Block a user