The method that return all the enum values exists only in the master branch.
Rafael Mendonça França http://twitter.com/rafaelfranca https://github.com/rafaelfranca On Wed, Feb 5, 2014 at 6:47 PM, desheng li <[email protected]> wrote: > 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 > > -- > You received this message because you are subscribed to the Google Groups > "Ruby on Rails: Core" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To post to this group, send email to [email protected]. > Visit this group at http://groups.google.com/group/rubyonrails-core. > For more options, visit https://groups.google.com/groups/opt_out. > -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/rubyonrails-core. For more options, visit https://groups.google.com/groups/opt_out.
