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
User.usertypes
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