I\'m using the bootstrap3-datetimepicker-rails gem to let users store the scheduled_date
of a WorkOrder
in my application (a \'DateTime\' property), bu
You can remove the modifications from the Controller all together by updating the values in the model. I feel this is a much cleaner (and reusable) approach.
class Work < ActiveRecord::Base
def scheduled_date=(date)
begin
parsed = Date.strptime(date,'%m/%d/%Y %I:%M %p')
super parsed
rescue
date
end
end
end