Module: RailsAdminSettingsUi::Helper

Defined in:
lib/rails_admin_settings_ui/helper.rb

Instance Method Summary collapse

Instance Method Details

#badge_color_for_type(field_type) ⇒ Object



3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
# File 'lib/rails_admin_settings_ui/helper.rb', line 3

def badge_color_for_type(field_type)
  case field_type
  when :boolean
    'success'
  when :integer, :float
    'info'
  when :text, :json
    'warning'
  when :email, :url
    'primary'
  when :array
    'dark'
  else # :string
    'dark'
  end
end