rails/strong_parameters — pull request #111 by route (2013-03-01 09:43:27+00:00)
Title: Empty all protected attributes when integrate strong_parameters

For Rails 4 `attr_accessible` and `attr_protected` were extracted, so it's not problem to set these attributes with `strong_parameters` but for rails 3 it AR protects default attributes and it's impossible to set them even if they passed by `strong_parameters`
```
1.9.3p385 :001 > raw_parameters = { :id => 1, :type => 'MediaFile' }
=> {:id=>1, :type=>"MediaFile"}
1.9.3p385 :002 > parameters = ActionController::Parameters.new(raw_parameters)
=> {"id"=>1, "type"=>"MediaFile"}
1.9.3p385 :003 > gift = Gift.new(parameters.permit(:id, :type))
ActiveModel::MassAssignmentSecurity::Error: Can't mass-assign protected attributes: id, type
```