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!


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



-- 
At.
Carlos Antonio

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

Reply via email to