Permalink
Browse files

Merge pull request #15045 from xanhast/patch-1

Documentation, add examples of using an Enum scope [ci skip]
  • Loading branch information...
2 parents f451169 + 21b0c2e commit 074c8ef38e333db1e97ac6b0136e76854fc28632 @chancancode chancancode committed May 9, 2014
Showing with 4 additions and 2 deletions.
  1. +4 −2 activerecord/lib/active_record/enum.rb
View
6 activerecord/lib/active_record/enum.rb
@@ -27,8 +27,10 @@ module ActiveRecord
# conversation.status # => nil
#
# Scopes based on the allowed values of the enum field will be provided
- # as well. With the above example, it will create an +active+ and +archived+
- # scope.
+ # as well. With the above example:
+ #
+ # Conversation.active
+ # Conversation.archived
#
# You can set the default value from the database declaration, like:
#

0 comments on commit 074c8ef

Please sign in to comment.