bernat / best_in_place

A RESTful unobtrusive jQuery Inplace-Editor and a helper as a Rails Gem
http://blog.bernatfarrero.com/in-place-editing-with-javascript-jquery-and-rails-3/
1.2k stars 571 forks source link

Feature idea: specify the display class for check boxes true/false #542

Open vanboom opened 8 years ago

vanboom commented 8 years ago

<%= best_in_place @user, :receive_emails, as: :checkbox, collection: ["No, thanks", "Yes, of course!"], true_class: "checked", false_class: "unchecked" %>

It would be cool if we could specify different classes for the check box handler to change colors or depiction based on the value.

I will try to implement this as best I can, but welcome everyone's suggestions.