Permalink
Browse files

Updated comment to mention the enum mapping class method [ci skip]

  • Loading branch information...
1 parent ce95fb2 commit e64a83cdbd3ce836f3339c600c1006b20c23d8fd @chancancode chancancode committed Jan 14, 2014
Showing with 3 additions and 2 deletions.
  1. +3 −2 activerecord/lib/active_record/enum.rb
@@ -54,11 +54,12 @@ module ActiveRecord
# remove unused values, the explicit +Hash+ syntax should be used.
#
# In rare circumstances you might need to access the mapping directly.
- # The mappings are exposed through a constant with the attributes name:
+ # The mappings are exposed through a class method with the pluralized attribute
+ # name:
#
# Conversation.statuses # => { "active" => 0, "archived" => 1 }
#
- # Use that constant when you need to know the ordinal value of an enum:
+ # Use that class method when you need to know the ordinal value of an enum:
#
# Conversation.where("status <> ?", Conversation.statuses[:archived])
module Enum

0 comments on commit e64a83c

Please sign in to comment.