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 committed 2013-01-04 18:42:25 +08:00
1 parent 3e8b029c5f
commit 5efbe07fbe
16 files changed
+98 -42

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