[Rails] Re: ActiveRecord and consistent timestamps in transactions

2015-09-02 Thread Jan Raasch
Hi guys, same problem here. > As for my opinion on the matter, I think AR should not be setting the > time itself and it should be using the database NOW function. Totally agree. I feel like the Rails' behavior is very counterintuitive here. Have you taken the discussion else where? I would

[Rails] Re: ActiveRecord and consistent timestamps in transactions

2015-07-23 Thread Kenny Ortmann
I think this is a very important topic, but you posted it in the ruby-forum. You should repost it over in the rails forum or on the rails google group. As for my opinion on the matter, I think AR should not be setting the time itself and it should be using the database NOW function. Idea 2:

Re: [Rails] Re: ActiveRecord and consistent timestamps in transactions

2015-05-27 Thread Henry Lawson
Hello, If I am understanding correctly, you need some mechanism to correlate several models together, you are hoping to use the created_at and modified_at timestamps provided by active record, to match the models using a timestamp. I see the created_at and modified_at timestamp's as database

[Rails] Re: ActiveRecord and consistent timestamps in transactions

2015-05-26 Thread Ruby Railhead
Hello, Frederick: Thanks for your response, that was very helpful both in validating my approach, and suggesting other ways to accomplish this. I'm still surprised this issue hasn't come up for others ... does anyone else have input on how this should/shouldn't be performed, or how they

[Rails] Re: ActiveRecord and consistent timestamps in transactions

2015-05-21 Thread Frederick Cheung
On Thursday, May 21, 2015 at 6:58:35 AM UTC+1, Ruby Railhead wrote: Idea 3: Subclass ActiveRecord::Base (to say ActiveRecordLocal) and mix in the modules mentioned above into this class. Thoughts: This makes is clearer that when you're using ActiveRecordLocal, you're not getting the