can display relation between author

This commit is contained in:
Rueshyna committed 2012-12-03 17:16:28 +08:00
1 parent 6d2fa673c7
commit 5660ff8f03
5 files changed
+22 -7

No files matched your search

+1 -2
View File
@@ -6,9 +6,8 @@ class CoAuthor
field :name_id, type: BSON::ObjectId
field :co_author, localize: true
field :email
field :type
has_and_belongs_to_many :co_author_relations
belongs_to :co_author_relations
VALID_EMAIL_REGEX = /\A[\w+\-.]+@[a-z\d\-.]+\.[a-z]+\z/
validates :email, format: { with: VALID_EMAIL_REGEX },