rails 4.1 unable to get all enum types

I just upgrade my app to rails 4.1.0.beta1

I have a class

class User < ActiveRecord::Base
    enum usertype: { :employee => 10, :boss => 30, :manager => 40, :admin => 50 }

All the enum feature works well like user.boss? # ture

But when I try to get all user types by


I got a undefined method for “usertypes”

Any helps?

This is the link the I learn from http://edgeapi.rubyonrails.org/classes/ActiveRecord/Enum.html

The method that return all the enum values exists only in the master branch.

This is available on master only, not on the released beta version. I think you have the constant User::USERTYPES available, the implementation changed afterwards.

Also, please use the Rails Talk or stack overflow for questions, this list is mainly for feature discussions. Thanks!