thetron / mongoid-enum

Sweet enum sugar for your Mongoid documents
MIT License
117 stars 167 forks source link

Underscore in Enum field name while creating an index #58

Open esjayrockz opened 5 years ago

esjayrockz commented 5 years ago

What is the correct syntax for creating an index on an enum field? I've already created an enum named action like this. enum :action, Enum::Task::ACTION, default: :something

I wanted to know if the correct syntax is index _action: 1 or index action: 1.