Skip to content

Commit

Permalink
Add docs about _scopes option on enum. [ci skip]
Browse files Browse the repository at this point in the history
  • Loading branch information
morgoth authored and carlosantoniodasilva committed Oct 2, 2019
1 parent 1dc2ae0 commit 2ef9eca
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions activerecord/lib/active_record/enum.rb
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,12 @@ module ActiveRecord
# Conversation.where(status: [:active, :archived])
# Conversation.where.not(status: :active)
#
# Defining scopes can be disabled by setting +:_scopes+ to +false+.
#
# class Conversation < ActiveRecord::Base
# enum status: [ :active, :archived ], _scopes: false
# end
#
# You can set the default value from the database declaration, like:
#
# create_table :conversations do |t|
Expand Down

0 comments on commit 2ef9eca

Please sign in to comment.