From 32939fb0432e9f7a7a2d8aecb91b0bf2251d938d Mon Sep 17 00:00:00 2001 From: Markus Graf Date: Fri, 2 Oct 2015 21:34:31 +0200 Subject: [PATCH] supporter class black box --- app/models/supporter.rb | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/app/models/supporter.rb b/app/models/supporter.rb index 757e067..da36516 100644 --- a/app/models/supporter.rb +++ b/app/models/supporter.rb @@ -1,3 +1,16 @@ class Supporter include Mongoid::Document + + 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 end