diff options
author | Bernie Chiu <bernie@shoplineapp.com> | 2018-10-05 15:26:02 +0800 |
---|---|---|
committer | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2018-11-19 17:38:29 -0500 |
commit | 945fdd76925c9f615bf016717c4c8db2b2955357 (patch) | |
tree | 1b628cd8aad89c3fa444862266309149dda02bad /activejob/test/support | |
parent | df9dd4801b3c8a781d53680a3f5ec7dd0f7515e3 (diff) | |
download | rails-945fdd76925c9f615bf016717c4c8db2b2955357.tar.gz rails-945fdd76925c9f615bf016717c4c8db2b2955357.tar.bz2 rails-945fdd76925c9f615bf016717c4c8db2b2955357.zip |
Permit ActionController::Parameters for serializable Hash
Diffstat (limited to 'activejob/test/support')
-rw-r--r-- | activejob/test/support/stubs/strong_parameters.rb | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/activejob/test/support/stubs/strong_parameters.rb b/activejob/test/support/stubs/strong_parameters.rb new file mode 100644 index 0000000000..acba3a4504 --- /dev/null +++ b/activejob/test/support/stubs/strong_parameters.rb @@ -0,0 +1,15 @@ +# frozen_string_literal: true + +class Parameters + def initialize(parameters = {}) + @parameters = parameters.with_indifferent_access + end + + def permitted? + true + end + + def to_h + @parameters.to_h + end +end |