diff options
author | Pratik Naik <pratiknaik@gmail.com> | 2010-12-30 18:41:53 +0000 |
---|---|---|
committer | Pratik Naik <pratiknaik@gmail.com> | 2010-12-30 18:42:18 +0000 |
commit | 573fd39e22b3d278457fa764c107095808b361fe (patch) | |
tree | 07c719d2c960c82a09eaa856513d7c641add6e6f /activerecord/lib | |
parent | eb1e727544d9719cf0aa4d914c484a83e707b601 (diff) | |
download | rails-573fd39e22b3d278457fa764c107095808b361fe.tar.gz rails-573fd39e22b3d278457fa764c107095808b361fe.tar.bz2 rails-573fd39e22b3d278457fa764c107095808b361fe.zip |
Make sure Model#touch doesn't try to update non existing columns
Diffstat (limited to 'activerecord/lib')
-rw-r--r-- | activerecord/lib/active_record/timestamp.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/activerecord/lib/active_record/timestamp.rb b/activerecord/lib/active_record/timestamp.rb index 2ecbd906bd..5617adea1f 100644 --- a/activerecord/lib/active_record/timestamp.rb +++ b/activerecord/lib/active_record/timestamp.rb @@ -67,7 +67,7 @@ module ActiveRecord end def timestamp_attributes_for_update_in_model - timestamp_attributes_for_update.select { |c| respond_to?(c) } + timestamp_attributes_for_update.select { |c| self.class.column_names.include?(c.to_s) } end def timestamp_attributes_for_update #:nodoc: |