I'm using the x-editable-rails gem with bootstrap to display an inline-editable field for my model. This particular field is a boolean field called "active".
I have this in my rails view (slim) to display the model:
table.table
thead
tr
th Name
th Active
tbody
- @person.each do |person|
tr
td = person.name
td = editable person, :active
This works perfectly fine and generates entries with the name, and a true/false for the active field.
But "true/false" is a bit of an inelegant way to display a boolean field, so I would like to change this to glyphicon-ok / glyphicon-remove. I can get the icon to display by just specifying the class as follows:
td = editable person, :active,
class: "glyphicon glyphicon-#{person.active ? 'ok' : 'remove'}"
However, this still leaves the "true/false" text. How do I prevent it from displaying that?