module RailsAdmin::Config::Fields::Types
Public Class Methods
load(type)
click to toggle source
# File lib/rails_admin/config/fields/types.rb, line 13 def self.load(type) @@registry.fetch(type.to_sym) { raise "Unsupported field datatype: #{type}" } end
register(type, klass = nil)
click to toggle source
# File lib/rails_admin/config/fields/types.rb, line 17 def self.register(type, klass = nil) if klass.nil? && type.is_a?(Class) klass = type type = klass.name.to_s.demodulize.underscore end @@registry[type.to_sym] = klass end