redhataccess / foreman-plugin

Container for Foreman Plugin
13 stars 20 forks source link

Update for 6.3 and strong params #4

Closed ehelms closed 8 years ago

ehelms commented 8 years ago

Foreman has updated the core code to use strong params which means any attr_accessible calls will immediately error, e.g.:

RuntimeError: RedhatAccess::TelemetryConfiguration is using attr_accessible so must either be converted to strong parameters, or add the protected_attributes gem
 | /usr/share/foreman/config/initializers/active_record_extensions.rb:21:in `attr_accessible'
 | /opt/theforeman/tfm/root/usr/share/gems/gems/redhat_access-1.0.11/app/models/redhat_access/telemetry_configuration.rb:6:in `<class:TelemetryConfiguration>'
 | /opt/theforeman/tfm/root/usr/share/gems/gems/redhat_access-1.0.11/app/models/redhat_access/telemetry_configuration.rb:2:in `<module:RedhatAccess>'
 | /opt/theforeman/tfm/root/usr/share/gems/gems/redhat_access-1.0.11/app/models/redhat_access/telemetry_configuration.rb:1:in `<top (required)>'

See [1] for the changes made in 1.13.

[1] https://github.com/theforeman/foreman/pull/3659