diff options
Diffstat (limited to 'railties/lib/rails/configuration.rb')
-rw-r--r-- | railties/lib/rails/configuration.rb | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/railties/lib/rails/configuration.rb b/railties/lib/rails/configuration.rb index d8185bcb34..46b363c70e 100644 --- a/railties/lib/rails/configuration.rb +++ b/railties/lib/rails/configuration.rb @@ -44,14 +44,14 @@ module Rails # Cookies, Session and Flash, BestStandardsSupport, and MethodOverride. You # can always add any of them later manually if you want. class MiddlewareStackProxy + attr_reader :http_only + alias :http_only? :http_only + def initialize @operations = [] @http_only = false end - attr_reader :http_only - alias :http_only? :http_only - def http_only! @http_only = true end @@ -90,6 +90,9 @@ module Rails attr_accessor :aliases, :options, :templates, :fallbacks, :colorize_logging attr_reader :hidden_namespaces + attr_reader :http_only + alias :http_only? :http_only + def initialize @aliases = Hash.new { |h,k| h[k] = {} } @options = Hash.new { |h,k| h[k] = {} } @@ -97,6 +100,7 @@ module Rails @templates = [] @colorize_logging = true @hidden_namespaces = [] + @http_only = false end def initialize_copy(source) @@ -110,6 +114,10 @@ module Rails @hidden_namespaces << namespace end + def http_only! + @http_only = true + end + def method_missing(method, *args) method = method.to_s.sub(/=$/, '').to_sym |