We recently upgraded from Rails 3.2 on Rails 4.2, and this also brought for us an upgrade of the SimpleForm gem along.
def rm_form_for(object, *args, &block)
options = args.extract_options!
options[:html] = {autocomplete: 'off'}.merge(options[:html] || {})
simple_form_for(object, *(args << options), &block)
end
When we use this method for generating a form, and pass for example a form object along called Admins::SupplierFormObject,
This would generate a form with the name for all fields set to admins_supplier_form_object, same for the params hash that was expected in the controller.
When dealing with an edit form, the hash was prepended with edit_.
However now on Rails 4 and the latest simple_form, this behaviour changed.
On the same case, we now simply have a params[:supplier] as hash for the controller, and the wrapper for the HTML also changed from admins_supplier_form_object into supplier.
Is this an intended change from simple_form, or does this come from rails?
And can we have the described behaviour back again somehow?
Kind regards,
Arne