From d6e3f9ba5da6dd75d4620be900b773969a65ff62 Mon Sep 17 00:00:00 2001 From: Petko Bordjukov Date: Mon, 20 Apr 2015 18:34:17 +0300 Subject: [PATCH] Make the status attribute of Proposition an enum --- app/models/proposition.rb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/models/proposition.rb b/app/models/proposition.rb index 0ae055d..8c16d93 100644 --- a/app/models/proposition.rb +++ b/app/models/proposition.rb @@ -2,4 +2,6 @@ class Proposition < ActiveRecord::Base belongs_to :proposer, class_name: 'User' belongs_to :proposition_accepting, polymorphic: true belongs_to :proposable, polymorphic: true + + enum status: [:undecided, :approved, :rejected, :backup] end