1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00
rails--rails/actionpack/test/controller/parameters
Shuhei Kagawa 1b0526eaac Return super in ActionController::Parameters.const_missing
The current implementation of ActionController::Parameters.const_missing
returns `ActionController::Parameters.always_permitted_parameters` even
if its `super` returns a constant without raising error. This prevents its
subclass in a autoloading module/class from taking advantage of
autoloading constants.

    class SomeParameters < ActionController::Parameters
      def do_something
        DefinedSomewhere.do_something
      end
    end

In the code above, `DefinedSomewhere` is to be autoloaded with
`Module.const_missing` but `ActionController::Parameters.const_missing`
returns `always_permitted_parameters` instead of the autoloaded
constant.

This pull request fixes the issue respecting `const_missing`'s `super`.
2015-03-28 10:40:58 +09:00
..
accessors_test.rb Fix failing test on several methods on Parameter 2014-08-18 20:42:46 -04:00
always_permitted_parameters_test.rb Return super in ActionController::Parameters.const_missing 2015-03-28 10:40:58 +09:00
log_on_unpermitted_params_test.rb Simple Sungularize ActionController::UnpermittedParameters error in case when only 1 parameter is unpermitted. 2014-02-24 13:25:38 +04:00
multi_parameter_attributes_test.rb
mutators_test.rb Fix failing test on several methods on Parameter 2014-08-18 20:42:46 -04:00
nested_parameters_test.rb
parameters_permit_test.rb Add AC::Parameters#to_unsafe_h 2014-12-12 18:52:10 +07:00
raise_on_unpermitted_params_test.rb