Skip to content

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

License

Notifications You must be signed in to change notification settings

headwayio/administrate-field-boolean_to_yes_no

Repository files navigation

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': ""

About

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

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •