lib/admin_it/field/field.rb in admin_it-1.3.3 vs lib/admin_it/field/field.rb in admin_it-1.3.4
- old
+ new
@@ -17,12 +17,12 @@
extend ExtendIt::Dsl
extend DisplayableName
include ExtendIt::Callbacks
TYPES = %i(unknown integer float string date datetime time relation enum
- array hash range regexp symbol binary image geo_point)
- EDITORS = %i(text combo radio image hidden geo_picker)
+ array hash range regexp symbol binary image geo_point boolean)
+ EDITORS = %i(text combo radio image hidden geo_picker boolean)
define_callbacks :initialize
dsl do
dsl_accessor :type, default: TYPES[0]
@@ -125,9 +125,10 @@
def self.editor
return @editor unless @editor.nil?
return @editor = :image if type == :image
return @editor = :combo if type == :enum
return @editor = :geo_picker if type == :geo_point
+ return @editor = :boolean if type == :boolean
@editor = EDITORS[0]
end
class_attr_reader :entity_class, :display_name, :type, :partial, :editor,
:options