custom lib for datepicker

Hi there,

I'm doing an own library to manage datetimes depending on locales, to deal with the formats of datetimes. I actually overrides the default assign methods to made strptime.

I've made the following:

something is wrong when trying to access on I18n.t, the scope is valid, if I put a debugger outside that misterious loop it prints what is expected...

console output:

1.9.3p125 :001 > User.datepicker_attributes :created_at => [:created_at] 1.9.3p125 :002 > User.new.created_at = "10/10/2012 10:12" => "10/10/2012 10:12" debugger outside the loop. (rdb:1) p I18n.t('time.datepicker_formats').values.first "%d/%m/%Y %H:%M" (rdb:1) p Time.strptime(date, I18n.t('time.datepicker_formats').values.first) 2012-10-10 10:12:00 +0200

I'm a little stuck on that, any tip will be appreciated