mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
28 lines
No EOL
513 B
Ruby
28 lines
No EOL
513 B
Ruby
module ActionController
|
|
module Configuration
|
|
extend ActiveSupport::Concern
|
|
|
|
def config
|
|
@config ||= self.class.config
|
|
end
|
|
|
|
def config=(config)
|
|
@config = config
|
|
end
|
|
|
|
module ClassMethods
|
|
def default_config
|
|
@default_config ||= {}
|
|
end
|
|
|
|
def config
|
|
self.config ||= default_config
|
|
end
|
|
|
|
def config=(config)
|
|
@config = ActiveSupport::OrderedHash.new
|
|
@config.merge!(config)
|
|
end
|
|
end
|
|
end
|
|
end |