[Rails] db connection returns stale values

2013-05-20 Thread tom_302
Hello, I'm working on a rails 3 app for a legacy oracle db. I have a controller that saves object graphs (accepts_nested_attributes_for) but I noticed the post-update JSON response still contains the pre-update values. After some debugging, it appears the database connection is returning s

[Rails] Re: run :before_filter before loading controller's ActiveRecord model?

2012-07-29 Thread tom_302
29, 2012 2:26:30 PM UTC-4, Frederick Cheung wrote: > > On Sunday, July 29, 2012 6:54:50 PM UTC+1, tom_302 wrote: > > Thanks - and good call on the lambda for delaying evaluation of the > user_id. > > > > > > Unfortunately, I also need the user_id to authenticate

[Rails] Re: run :before_filter before loading controller's ActiveRecord model?

2012-07-29 Thread tom_302
plain. On Saturday, July 28, 2012 11:06:27 AM UTC-4, Frederick Cheung wrote: > > > > On Saturday, July 28, 2012 4:20:36 AM UTC+1, tom_302 wrote: > >> >> NativeException ([from a java method of the legacy application]): >> >> config/initializers/myapp

[Rails] run :before_filter before loading controller's ActiveRecord model?

2012-07-27 Thread tom_302
Hello, I'm creating a Rails app on top of a legacy document management system. I'm looking for a way to force an ApplicationController's :before_filter method to execute before the ActiveRecord model is evaluated: class *Document* << ActiveRecord::Base acts_as_controlled end My acts_