bootstrap_form icon indicating copy to clipboard operation
bootstrap_form copied to clipboard

wrapper_class is not overridden in check_box helper

Open aydinkazim opened this issue 1 year ago • 0 comments
trafficstars

Hello,

I'm experiencing an inconsistency with the wrapper_class option when using the check_box helper in the bootstrap_form gem. For most form elements like text_field and file_field, specifying a wrapper_class will override the existing wrapper class with the provided one. However, with check_box, the specified class is appended to the existing wrapper class instead of overriding it.

Here’s an example of the code I’m using:

@f.check_box(:remove_image, wrapper_class: 'yamtar')
Screenshot 2024-10-08 at 14 19 33

In this case, the check_box wrapper class is not overridden by 'yamtar'. Instead, it adds 'yamtar' to the existing wrapper classes. This behavior is inconsistent with other helpers like text_field and file_field, where the wrapper class is fully overridden.

Is this the intended behavior for check_box, or could it be a bug? It would be helpful if the check_box behavior matched that of the other helpers for consistency.

Thank you for your help! ❤️

aydinkazim avatar Oct 08 '24 11:10 aydinkazim