/administrate-field-boolean_to_yes_no

Show a checkbox for boolean fields when editing, but "Yes" or "No" when displaying in an index or show view

Primary LanguageRubyMIT LicenseMIT

Administrate::Field::BooleanToYesNo

A plugin for Administrate

Usage

Add to your Gemfile:

gem 'administrate-field-boolean_to_yes_no'

Run:

$ bundle install

Add to your FooDashboard:

ATTRIBUTE_TYPES = [
  active: Field::BooleanToYesNo
]

Customize

Customize or overwrite the labels by just adding this to your config/locales/*.yml.

administrate:
  fields:
    boolean_to_yes_no:
      'false': "🚫"
      'true': ""