vendor/rails/actionpack/lib/action_controller/base.rb in radiant-0.6.3 vs vendor/rails/actionpack/lib/action_controller/base.rb in radiant-0.6.4

- old
+ new

@@ -290,10 +290,14 @@ cattr_accessor :template_class # Turn on +ignore_missing_templates+ if you want to unit test actions without making the associated templates. cattr_accessor :ignore_missing_templates + # Controls the resource action separator + @@resource_action_separator = "/" + cattr_accessor :resource_action_separator + # Holds the request object that's primarily used to get environment variables through access like # <tt>request.env["REQUEST_URI"]</tt>. attr_internal :request # Holds a hash of all the GET, POST, and Url parameters passed to the action. Accessed like <tt>params["post_id"]</tt> @@ -391,11 +395,12 @@ if key =~ parameter_filter filtered_parameters[key] = '[FILTERED]' elsif value.is_a?(Hash) filtered_parameters[key] = filter_parameters(value) elsif block_given? - key, value = key.dup, value.dup + key = key.dup + value = value.dup if value yield key, value filtered_parameters[key] = value else filtered_parameters[key] = value end @@ -536,9 +541,10 @@ # Converts the class name from something like "OneModule::TwoModule::NeatController" to "one_module/two_module/neat". def controller_path self.class.controller_path end + # Test whether the session is enabled for this request. def session_enabled? request.session_options && request.session_options[:disabled] != false end protected