instance method
configure
Ruby on Rails 8.1.2
Since v3.0.20Signature
configure()
Configure values from within the passed block.
require "active_support/configurable"
class User
include ActiveSupport::Configurable
end
User.allowed_access # => nil
User.configure do |config|
config.allowed_access = true
end
User.allowed_access # => true
Source
# File activesupport/lib/active_support/configurable.rb, line 73
def configure
yield config
end
Defined in activesupport/lib/active_support/configurable.rb line 73
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActiveSupport::Configurable::ClassMethods