lib/frenchy/model.rb in frenchy-0.6.1 vs lib/frenchy/model.rb in frenchy-0.6.2
- old
+ new
@@ -143,10 +143,10 @@
when "time"
# Convert value to a Time or DateTime. Numbers are treated as unix timestamps,
# other values are parsed with DateTime.parse.
define_method("#{name}=") do |v|
- if v.is_a?(Fixnum)
+ if v.is_a?(Integer)
set(name, Time.at(v).to_datetime)
elsif v.is_a?(DateTime)
set(name, v)
elsif v.is_a?(Time)
set(name, v.to_datetime)