diff options
author | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2014-02-04 15:27:57 -0200 |
---|---|---|
committer | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2014-02-04 15:27:57 -0200 |
commit | f92142dce19906cd62382f7938cd748dd48b7d65 (patch) | |
tree | eb0d6be3c967136568dbe855ff053f295fa9a6ff /activerecord/lib/active_record | |
parent | 90794325cfcc0502398c23a9f8db0017270121a7 (diff) | |
download | rails-f92142dce19906cd62382f7938cd748dd48b7d65.tar.gz rails-f92142dce19906cd62382f7938cd748dd48b7d65.tar.bz2 rails-f92142dce19906cd62382f7938cd748dd48b7d65.zip |
Document that enum conditions must use the ordinal value
[ci skip]
Diffstat (limited to 'activerecord/lib/active_record')
-rw-r--r-- | activerecord/lib/active_record/enum.rb | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/activerecord/lib/active_record/enum.rb b/activerecord/lib/active_record/enum.rb index 059bfe9a0f..4aa323fb00 100644 --- a/activerecord/lib/active_record/enum.rb +++ b/activerecord/lib/active_record/enum.rb @@ -62,6 +62,8 @@ module ActiveRecord # Use that class method when you need to know the ordinal value of an enum: # # Conversation.where("status <> ?", Conversation.statuses[:archived]) + # + # Where conditions on an enum attribute must use the ordinal value of an enum. module Enum DEFINED_ENUMS = {} # :nodoc: |