aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGodfrey Chan <godfreykfc@gmail.com>2014-05-09 13:49:20 -0700
committerGodfrey Chan <godfreykfc@gmail.com>2014-05-09 13:49:20 -0700
commit074c8ef38e333db1e97ac6b0136e76854fc28632 (patch)
treeb22c3979302e60b650ca6f919f0707359505d74c
parentf4511690994f0c14c60320bbeecc66549332dbee (diff)
parent21b0c2e8a7119fd667e02f4207f0eaa3bd33d3bc (diff)
downloadrails-074c8ef38e333db1e97ac6b0136e76854fc28632.tar.gz
rails-074c8ef38e333db1e97ac6b0136e76854fc28632.tar.bz2
rails-074c8ef38e333db1e97ac6b0136e76854fc28632.zip
Merge pull request #15045 from xanhast/patch-1
Documentation, add examples of using an Enum scope [ci skip]
-rw-r--r--activerecord/lib/active_record/enum.rb6
1 files changed, 4 insertions, 2 deletions
diff --git a/activerecord/lib/active_record/enum.rb b/activerecord/lib/active_record/enum.rb
index 18f1ca26de..c7ec093824 100644
--- a/activerecord/lib/active_record/enum.rb
+++ b/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:
#