Permalink
Browse files

Document that enum conditions must use the ordinal value

[ci skip]
  • Loading branch information...
1 parent 9079432 commit f92142dce19906cd62382f7938cd748dd48b7d65 @rafaelfranca rafaelfranca committed Feb 4, 2014
Showing with 2 additions and 0 deletions.
  1. +2 −0 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:

0 comments on commit f92142d

Please sign in to comment.