-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
simple_form_for and :namespace #1161
Comments
Which version of Simple Form are you using? |
I am on version 3.1.0.rc2. |
Does it works with the Rails helpers |
Ok, I changed Note: Github does not let me use colon-name it works and the labels are correctly set. |
Cool, so it is definitely a simple form bug. I'll work on it.
|
Great! Good luck bug hunting. |
Thanks so much. It works ike a charm. Great gem btw. |
Thanks. |
awesome took me half an hour to to find the namespace feature, getting angry that its broken and finding this thread. and then its already solved, just needed to update ;) so happy that people really care about this little features |
Hi,
I am not sure if this is an issue with simple form.
I have a few objects of the same model I want to edit in one view. To guarantie that the input ids are unique I use the namespace option like that;
= simple_form_for unit, url: users_unit_path(unit), namespace: unit.id, remote: true do |f|
...
Now if I have a association like that:
= f.association :room_properties, label: false, collection: RoomProperty.all, as: :check_boxes
The html that is generated looks like:
...
...
As you can see the labels for is "unit_room_property_ids_7" but it should be ""1_unit_room_property_ids_7".
Is it a bug? And if not how do I correct the label to fit with the input id?
Thanks
The text was updated successfully, but these errors were encountered: