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

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

Instance Method Summary collapse

Instance Method Details

#typeObject



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

def type
  if property.type.to_s == 'Money' || property.type.class.name == 'MoneyType'
    :money_field
  else
    type_without_money_field
  end
end

#type_without_money_fieldObject



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

alias_method :type_without_money_field, :type