diff options
Diffstat (limited to 'activerecord/test/support/stubs')
-rw-r--r-- | activerecord/test/support/stubs/strong_parameters.rb | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/activerecord/test/support/stubs/strong_parameters.rb b/activerecord/test/support/stubs/strong_parameters.rb index acba3a4504..84f93a28b9 100644 --- a/activerecord/test/support/stubs/strong_parameters.rb +++ b/activerecord/test/support/stubs/strong_parameters.rb @@ -3,10 +3,16 @@ class Parameters def initialize(parameters = {}) @parameters = parameters.with_indifferent_access + @permitted = false end def permitted? - true + @permitted + end + + def permit! + @permitted = true + self end def to_h |