I have this error when I create a shift...
ActiveRecord::MultiparameterAssignmentErrors (2 error(s) on assignment of multiparameter attributes [error on assignment [8, 0, 1970, 1, 1] to inizio (undefined method `Europe/Rome' for Time:Class),error on assignment [16, 0, 1970, 1, 1] to fine (undefined method `Europe/Rome' for Time:Class)]):
app/controllers/shifts_controller.rb:43:in `create'
In the application.rb i have
config.time_zone = 'Europe/Rome'
config.active_record.default_timezone = 'Europe/Rome'
the Model is
class Shift < ActiveRecord::Base
after_initialize do
self.stato ||= true
self.inizio ||= Time.zone.now
self.fine ||= Time.zone.now
end
end
The Controller is : http://nopaste.info/3268dc795c.html
Migrate is : http://nopaste.info/eb674af117.html