Modifies how boolean values are displayed in attributes_table
control (the one used in show view)
You just need to use bool_row
method
show do
attributes_table do
bool_row :paid
end
end
Modifies how boolean values are displayed in index view
You just need to use bool_column
method
index do
bool_column :paid
end
You can set your own style for boolean values, adding the following code to active_admin.scss
file.
.bool-value {
font-size: 12px;
&.true-value {
color: #08A510;
}
&.false-value {
color: #FF0000;
}
}
- true: ✔
- false: ✗
es:
activeadmin:
addons:
boolean:
default:
true_value: pagada
false_value: no pagada
es:
activeadmin:
addons:
boolean:
models:
invoice:
true_value: pagada
false_value: no pagada
es:
activeadmin:
addons:
boolean:
models:
invoice:
paid:
true_value: pagada
false_value: no pagada