I'm using the active_enum
gem in my Rails 4 application. https://github.com/adzap/active_enum
gem 'active_enum'
In my model, I have an enumerate:
class Meeting < ActiveRecord::Base
enumerate :participant_type do
value 0 => 'Juniors'
value 1 => 'Senior'
value 2 => 'Administration'
end
end
How can I use these values in a form select element?
I've tried the following but I get a runtime error:
= f.select :participant_type, Loan.participant_type
undefined method `participant_type' for #<Class:0x007f8803581050>