2015-10-02 21:19:00 +02:00
|
|
|
class Supporter
|
|
|
|
|
include Mongoid::Document
|
2015-10-02 21:34:31 +02:00
|
|
|
|
|
|
|
|
field :first_name, type: String
|
|
|
|
|
field :last_name, type: String
|
|
|
|
|
field :street, type: String
|
|
|
|
|
field :zip, type: Integer
|
|
|
|
|
field :email, type: String
|
|
|
|
|
field :support, type: String # Indicates the type of support
|
|
|
|
|
field :votable, type: Boolean
|
|
|
|
|
|
|
|
|
|
field :age_category, type: String
|
|
|
|
|
|
|
|
|
|
validates :email, presence: true, uniqueness: true
|
|
|
|
|
validates :support, presence: true
|
2015-10-02 21:19:00 +02:00
|
|
|
end
|