Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

update the AR enum docs to match the actual behavior. [ci skip]

  • Loading branch information...
commit 02b67577973c628e8176bf2586fff8f7a487d6bf 1 parent dcee010
@senny senny authored
Showing with 3 additions and 5 deletions.
  1. +3 −5 activerecord/lib/active_record/enum.rb
View
8 activerecord/lib/active_record/enum.rb
@@ -5,20 +5,18 @@ module ActiveRecord
# enum status: [ :active, :archived ]
# end
#
- # Conversation::STATUS # => { active: 0, archived: 1 }
- #
# # conversation.update! status: 0
# conversation.active!
# conversation.active? # => true
- # conversation.status # => :active
+ # conversation.status # => "active"
#
# # conversation.update! status: 1
# conversation.archived!
# conversation.archived? # => true
- # conversation.status # => :archived
+ # conversation.status # => "archived"
#
# # conversation.update! status: 1
- # conversation.status = :archived
+ # conversation.status = "archived"
#
# You can set the default value from the database declaration, like:
#
Please sign in to comment.
Something went wrong with that request. Please try again.