Make the status attribute of Proposition an enum

This commit is contained in:
Petko Bordjukov 2015-04-20 18:34:17 +03:00
parent d01e762c03
commit d6e3f9ba5d
1 changed files with 2 additions and 0 deletions

View File

@ -2,4 +2,6 @@ class Proposition < ActiveRecord::Base
belongs_to :proposer, class_name: 'User' belongs_to :proposer, class_name: 'User'
belongs_to :proposition_accepting, polymorphic: true belongs_to :proposition_accepting, polymorphic: true
belongs_to :proposable, polymorphic: true belongs_to :proposable, polymorphic: true
enum status: [:undecided, :approved, :rejected, :backup]
end end