diff options
author | Godfrey Chan <godfreykfc@gmail.com> | 2014-01-14 15:41:44 -0800 |
---|---|---|
committer | Godfrey Chan <godfreykfc@gmail.com> | 2014-01-14 15:41:44 -0800 |
commit | e64a83cdbd3ce836f3339c600c1006b20c23d8fd (patch) | |
tree | 2214e385dcaa1f62dfde92c68a6d998d7d0096bd | |
parent | ce95fb29919683bac9de4eb87dabeba1221262aa (diff) | |
download | rails-e64a83cdbd3ce836f3339c600c1006b20c23d8fd.tar.gz rails-e64a83cdbd3ce836f3339c600c1006b20c23d8fd.tar.bz2 rails-e64a83cdbd3ce836f3339c600c1006b20c23d8fd.zip |
Updated comment to mention the enum mapping class method [ci skip]
-rw-r--r-- | activerecord/lib/active_record/enum.rb | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/activerecord/lib/active_record/enum.rb b/activerecord/lib/active_record/enum.rb index c34fc086e2..3deb2d65f8 100644 --- a/activerecord/lib/active_record/enum.rb +++ b/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 |