We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 89c3746 + c63e2ea commit 1512cf2Copy full SHA for 1512cf2
activerecord/lib/active_record/enum.rb
@@ -111,6 +111,11 @@ module ActiveRecord
111
#
112
# conversation.comments_inactive!
113
# conversation.comments_active? # => false
114
+ #
115
+ # If you want to disable the auto-generated methods on the model, you can do
116
+ # so by setting the +:instance_methods+ option to false:
117
118
+ # enum :status, [ :active, :archived ], instance_methods: false
119
module Enum
120
def self.extended(base) # :nodoc:
121
base.class_attribute(:defined_enums, instance_writer: false, default: {})
0 commit comments