Actions
Refactor #16243
closedRemove required `options` argument to Host::Managed.new
Description
The second "options" hash argument to a model .new method no longer exists on Rails 5 (due to no protected_attrs support?), so Host::Managed#initialize should handle it being present or not.
The hash isn't used directly by initialize, only Rails. Host::Base already does this using a splat operator.
ArgumentError: wrong number of arguments (given 2, expected 0..1) activerecord (5.0.0) lib/active_record/core.rb:312:in `initialize' app/models/host/base.rb:82:in `initialize' actionpack (5.0.0) lib/action_dispatch/routing/url_for.rb:106:in `initialize' app/models/host/managed.rb:47:in `initialize' activerecord (5.0.0) lib/active_record/inheritance.rb:65:in `new' activerecord (5.0.0) lib/active_record/inheritance.rb:65:in `new' app/models/concerns/foreman/sti.rb:22:in `new_with_cast' app/models/host.rb:15:in `method_missing' factory_girl (4.7.0) lib/factory_girl/decorator/new_constructor.rb:9:in `new'
Updated by The Foreman Bot over 8 years ago
- Status changed from Assigned to Ready For Testing
- Pull request https://github.com/theforeman/foreman/pull/3768 added
Updated by Dominic Cleal over 8 years ago
- Status changed from Ready For Testing to Closed
- % Done changed from 0 to 100
Applied in changeset 8e780e97b1651e778722a82a9a8d2d8e5cdb351b.
Updated by Dominic Cleal over 8 years ago
- Translation missing: en.field_release set to 160
Actions