lib/ab_admin/utils.rb in ab_admin-0.1.2 vs lib/ab_admin/utils.rb in ab_admin-0.2.0
- old
+ new
@@ -107,21 +107,21 @@
resource.send(display_name_method_for(resource))
end
def pretty_data(object)
case object
- when String, Integer
+ when String, Integer, BigDecimal, Float
object
when TrueClass
'+'
when FalseClass
'-'
when Date, DateTime, Time, ActiveSupport::TimeWithZone
I18n.l(object, :format => :long)
when NilClass
''
else
- AbAdmin.safe_display_name(object)
+ AbAdmin.safe_display_name(object) || object
end
end
end
end
\ No newline at end of file