How do I get the HTML ‘name’ attribute a rails form builder will generate for a certain field?

After inspecting the form object, I found that you can get the object_name from it.

So this worked well for me: "#{f.object_name}[field_name]"

Which will generate: object[object_attributes][0][field_name]

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)