default widget link.

make sure to run
rake migrate:make_default_widget_work_config
for changing announcement module app
This commit is contained in:
Fu Matthew authored and chris committed 2013-01-07 17:20:37 +08:00
1 parent a34da20e48
commit 5793f0fe5d
16 files changed
+100 -50

No files matched your search

+3 -7
View File
@@ -19,6 +19,9 @@ class ModuleApp
field :widget_fields ,type: Array
field :widget_options,type:Hash
field :widget_options_fields_i18n,type:Hash
field :widget_fields_link_method,type:Hash
field :get_default_widget,type:Hash
has_many :managers,as: :managing_app ,:class_name => "AppManager" ,:dependent => :destroy#,:foreign_key => "managing_app_id",:inverse_of => :managing_app
has_many :sub_managers,as: :sub_managing_app ,:class_name => "AppManager", :dependent => :destroy#,:foreign_key => "sub_managing_app_id",:inverse_of => :sub_managing_app
@@ -30,13 +33,6 @@ class ModuleApp
before_save :set_key
#>>>>>>>>>>>>> remove after app config applied
def get_default_widget
{:query=>'Bulletin.all',:image=> 'image'}
end
#<<<<<<<<<<<<@@
def is_manager?(user)
managing_users.include?(user)
end