undefined方法`each_with_index':relationship_status:Symbol

时间:2015-12-18 06:16:56

标签: ruby-on-rails activerecord enums

我将_prefix用于相同的枚举。

我的模特

enum relationship_status: [:All,:Married, :Single, :Engaged, :Divorced, :Widowed, :Separated, :Complicated], _prefix: :relationship_status
enum gender: [:All,:Male, :Female], _prefix: :gender
enum qualification: [:All,:Uneducated,:Matric, :Inter, :Graduation, :Masters, :PHD], _prefix: :qualification

它出错

undefined method `each_with_index' for :relationship_status:Symbol

我如何解决?

0 个答案:

没有答案