can add relation between co-author

This commit is contained in:
Rueshyna authored and chris committed 2012-12-04 00:31:06 +08:00
1 parent 5dabfe9319
commit 7822ffc33d
18 files changed
+350 -77

No files matched your search

+1
View File
@@ -8,6 +8,7 @@ class CoAuthor
field :email
field :type
has_and_belongs_to_many :co_author_relations
VALID_EMAIL_REGEX = /\A[\w+\-.]+@[a-z\d\-.]+\.[a-z]+\z/
validates :email, format: { with: VALID_EMAIL_REGEX },
+8
View File
@@ -0,0 +1,8 @@
class CoAuthorRelation
include Mongoid::Document
include Mongoid::Timestamps
field :relation, localize: true
has_and_belongs_to_many :co_authors
end