From c50af24105399651b1bdbf52bddbb9c72d2b2e19 Mon Sep 17 00:00:00 2001 From: Elliot Winkler Date: Sat, 3 Sep 2016 21:39:02 -0600 Subject: [PATCH] Don't protect attributes under Rails 5 The protected_attributes gem is not compatible for Rails 5, and we don't need it anyway with Strong Parameters. --- spec/support/unit/model_creation_strategies/active_record.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spec/support/unit/model_creation_strategies/active_record.rb b/spec/support/unit/model_creation_strategies/active_record.rb index f9e268b4..ed8a83a6 100644 --- a/spec/support/unit/model_creation_strategies/active_record.rb +++ b/spec/support/unit/model_creation_strategies/active_record.rb @@ -42,7 +42,7 @@ def define_class_for_model run_block(model, block) end - if whitelist_attributes? + if whitelist_attributes? && model.respond_to?(:attr_accessible) model.attr_accessible(*columns.keys) end