Skip to content

Commit

Permalink
Don't protect attributes under Rails 5
Browse files Browse the repository at this point in the history
The protected_attributes gem is not compatible for Rails 5, and we don't
need it anyway with Strong Parameters.
  • Loading branch information
mcmire committed Sep 4, 2016
1 parent 864ef37 commit 513a651
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit 513a651

Please sign in to comment.