I recently updated Rails to the latests version, and one of my existing
apps broke. More speficially, it can’t find the method “updated?” when
it is attempting to call it on one of my models.
The stack trace follows:
NoMethodError
undefined method `updated?’ for #MyModel:0xc91d50
/usr/local/lib/ruby/gems/1.8/gems/activerecord-1.14.4/lib/active_record/base.rb:1792:in
method_missing' /usr/local/lib/ruby/gems/1.8/gems/activerecord-1.14.4/lib/active_record/callbacks.rb:352:in
callback’
/usr/local/lib/ruby/gems/1.8/gems/activerecord-1.14.4/lib/active_record/callbacks.rb:346:in
callback' /usr/local/lib/ruby/gems/1.8/gems/activerecord-1.14.4/lib/active_record/callbacks.rb:341:in
each’
/usr/local/lib/ruby/gems/1.8/gems/activerecord-1.14.4/lib/active_record/callbacks.rb:341:in
callback' /usr/local/lib/ruby/gems/1.8/gems/activerecord-1.14.4/lib/active_record/callbacks.rb:252:in
create_or_update’
/usr/local/lib/ruby/gems/1.8/gems/activerecord-1.14.4/lib/active_record/base.rb:1392:in
save_without_validation' /usr/local/lib/ruby/gems/1.8/gems/activerecord-1.14.4/lib/active_record/validations.rb:736:in
save_without_transactions’
/usr/local/lib/ruby/gems/1.8/gems/activerecord-1.14.4/lib/active_record/transactions.rb:126:in
save' /usr/local/lib/ruby/gems/1.8/gems/activerecord-1.14.4/lib/active_record/transactions.rb:126:in
transaction’
/usr/local/lib/ruby/gems/1.8/gems/activerecord-1.14.4/lib/active_record/transactions.rb:91:in
transaction' /usr/local/lib/ruby/gems/1.8/gems/activerecord-1.14.4/lib/active_record/transactions.rb:118:in
transaction’
/usr/local/lib/ruby/gems/1.8/gems/activerecord-1.14.4/lib/active_record/transactions.rb:126:in
save' #{RAILS_ROOT}/app/controllers/my_controller.rb:104:in
create’
I’m having a hard time finding out why this is happening and where I
should start investigating the matter. I tried looking through the
ActiveRecord code, but I can’t locate where the “updated?” call is even
coming from.
Any help is appreciated.
Thanks,
-Szymon R.