Module: SignedForm::TestHelper

Defined in:
lib/signed_form/test_helper.rb

Instance Method Summary collapse

Instance Method Details

#permit_all_parametersObject



3
4
5
6
7
8
9
10
11
12
13
14
15
# File 'lib/signed_form/test_helper.rb', line 3

def permit_all_parameters
  @controller.instance_eval do
    def params
      @permit_all_parameters ||= super.permit!
    end
  end

  if block_given?
    yield
    @controller.remove_instance_variable :@permit_all_parameters
    @controller.singleton_class.send :remove_method, :params
  end
end