Permalink
Browse files

Ensure we are looking with string keys

  • Loading branch information...
1 parent cbbb3c2 commit cc15d99488d25d1c356feeaee749effceccb3b46 @chancancode chancancode committed Apr 8, 2014
Showing with 1 addition and 1 deletion.
  1. +1 −1 activerecord/lib/active_record/enum.rb
@@ -139,7 +139,7 @@ def _enum_methods_module
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]

0 comments on commit cc15d99

Please sign in to comment.