can add relation between co-author
This commit is contained in:
1 parent
5dabfe9319
commit
7822ffc33d
18 files changed
+350
-77
No files matched your search
@@ -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 },
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
class CoAuthorRelation
|
||||
include Mongoid::Document
|
||||
include Mongoid::Timestamps
|
||||
|
||||
field :relation, localize: true
|
||||
|
||||
has_and_belongs_to_many :co_authors
|
||||
end
|
||||
Reference in new issue
Block a user