Sha256: 6a670a242ceed5c9fbd86ff03e518fdad4487bdbe222369fc20aba82ea546e47
Contents?: true
Size: 1.04 KB
Versions: 25
Compression:
Stored size: 1.04 KB
Contents
module RailsAdmin module Config module Fields module Types class Boolean < RailsAdmin::Config::Fields::Base # Register field type for the type loader RailsAdmin::Config::Fields::Types.register(self) register_instance_option :view_helper do :check_box end register_instance_option :pretty_value do case value when nil %(<span class='label label-default'>‒</span>) when false %(<span class='label label-danger'>✘</span>) when true %(<span class='label label-success'>✓</span>) end.html_safe end register_instance_option :export_value do value.inspect end register_instance_option :partial do :form_boolean end # Accessor for field's help text displayed below input field. def generic_help '' end end end end end end
Version data entries
25 entries across 25 versions & 2 rubygems