Make the status attribute of Proposition an enum
This commit is contained in:
parent
d01e762c03
commit
d6e3f9ba5d
|
@ -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
|
||||||
|
|
Loading…
Reference in New Issue