Skip to content

Latest commit

 

History

History
66 lines (52 loc) · 980 Bytes

bool_column.md

File metadata and controls

66 lines (52 loc) · 980 Bytes

Boolean values

Bool Column

Modifies how boolean values are displayed in index view

id name paid subscribed
123 Felipe

You just need to use bool_column method

index do
  column :id
  column :name
  bool_column :paid
  bool_column :subscribed
end

i18n Support

The default value is

  • true: ✔
  • false: ✗

Modifing the default

en:
  activeadmin:
    addons:
      boolean:
        default:
          true_value: ok
          false_value: nope

Modifing a specific model

en:
  activeadmin:
    addons:
      boolean:
        models:
          invoice:
            true_value: pagada
            false_value: no pagada

Modifing an specific model attribute

en:
  activeadmin:
    addons:
      boolean:
        models:
          invoice:
            paid:
              true_value: pagada
              false_value: no pagada