RubyGems Navigation menu

formtastic_tristate_radio 0.2.4

Have 3-state radiobuttons instead of a 2-state checkbox for your Boolean columns which can store NULL. This gem: 1. Provides a custom Formtastic input type `:tristate_radio` which renders 3 radios (“Yes”, “No”, “Unset”) instead of a checkbox (only where you put it). 2. Teaches Rails recognize `"null"` and `"nil"` param values as `nil`. See “[How it works](#how-it-works)” ☟ section for technical details on this. 3. Encourages you to add translations for ActiveAdmin “status tag” so that `nil` be correctly translated as “Unset” instead of “False”. Does not change controls, you need to turn it on via `as: :tristate_radio` option.

Gemfile:
= 复制到剪贴板 已复制!

安装:
=

版本列表:

  1. 0.2.7 - June 10, 2022 (13.5 KB)
  2. 0.2.6 - June 09, 2022 (13.0 KB)
  3. 0.2.5 - November 09, 2021 (24.5 KB)
  4. 0.2.4 - November 09, 2021 (13.0 KB)
  5. 0.2.3 - November 09, 2021 (13.5 KB)
显示所有版本 (共 9 个)

Runtime 依赖 (2):

formtastic >= 3, < 5
rails >= 4, < 7

Development 依赖 (2):

rspec ~> 3
yard >= 0.9.20, < 1

业主:

推送:

作者:

  • Sergey Pedan

SHA 256 校验和:

61d04f7d0e39442b1a00e3f8b1a3ae8136fbbe05d17e43a4387c0bb0496c4c3f

下载总量 9,874

这个版本 1,126

许可:

MIT

需要的 Ruby 版本: >= 2.4.0

链接: