Class: RailsAdmin::Adapters::Mongoid::Property

Inherits:
Object
  • Object
show all
Defined in:
lib/mongoid_time_field/rails_admin.rb

Instance Method Summary collapse

Instance Method Details

#typeObject



12
13
14
15
16
17
18
# File 'lib/mongoid_time_field/rails_admin.rb', line 12

def type
  if property.type.class.name == 'TimeField' || property.type.to_s == 'TimeField'
    :time_field
  else
    type_without_time_field
  end
end

#type_without_time_fieldObject



11
# File 'lib/mongoid_time_field/rails_admin.rb', line 11

alias_method :type_without_time_field, :type