Announcement modifications and tags

This commit is contained in:
Christophe Vilayphiou committed 2012-02-15 00:34:22 +08:00
1 parent f57e9f19f7
commit 3e70634add
38 files changed
+615 -143

No files matched your search

+4
View File
@@ -17,4 +17,8 @@ class I18nVariable
end
end
def self.from_locale(locale)
I18nVariable.first(:conditions => {:key => locale})[I18n.locale]
end
end
+2
View File
@@ -18,6 +18,8 @@ class ModuleApp
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
has_many :tags
has_one :app_auth,dependent: :delete
before_save :set_key
+9
View File
@@ -0,0 +1,9 @@
class Tag
include Mongoid::Document
include Mongoid::Timestamps
belongs_to :module_app
has_and_belongs_to_many :bulletins
end