aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record
diff options
context:
space:
mode:
authorGodfrey Chan <godfreykfc@gmail.com>2014-04-07 19:08:08 -0700
committerGodfrey Chan <godfreykfc@gmail.com>2014-04-07 19:08:08 -0700
commit77692ff9c32c1b4999bd4ff51af6b84186729478 (patch)
treee92aa4365283e39a8e5b4422eefcf9cfa039e8d9 /activerecord/lib/active_record
parenta5664fe27b1797983537c0764003e618bd3d2801 (diff)
downloadrails-77692ff9c32c1b4999bd4ff51af6b84186729478.tar.gz
rails-77692ff9c32c1b4999bd4ff51af6b84186729478.tar.bz2
rails-77692ff9c32c1b4999bd4ff51af6b84186729478.zip
Ensure we are looking with string keys
Diffstat (limited to 'activerecord/lib/active_record')
-rw-r--r--activerecord/lib/active_record/enum.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/activerecord/lib/active_record/enum.rb b/activerecord/lib/active_record/enum.rb
index 6e0d19ad31..18f1ca26de 100644
--- a/activerecord/lib/active_record/enum.rb
+++ b/activerecord/lib/active_record/enum.rb
@@ -139,7 +139,7 @@ module ActiveRecord
mod = Module.new do
private
def save_changed_attribute(attr_name, value)
- if (mapping = self.class.defined_enums[attr_name])
+ if (mapping = self.class.defined_enums[attr_name.to_s])
if attribute_changed?(attr_name)
old = changed_attributes[attr_name]