Added possibility to manually decide whether a check box is checked #909

Closed
wants to merge 1 commit into
from

2 participants

@yuszuv

I wanted the possibility to decide whether a check box is checked or not by passing the corresponding value (true or false) to the input. This now can be done by passing :input_html => { :checked => true/false }. Previously you only could check the input but not uncheck it, e.g. when builder.object.send(:method) returns true and you want the corresponding check box unchecked

I hope that helps.

Jan

@justinfrench
Owner

We don't have :checked options because it was impossible to apply them consistently. The correct approach is to set the model instance up with the default value either in the controller or as part of initialization. Closing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment