Permalink
Browse files

Ensure we are looking with string keys

  • Loading branch information...
chancancode committed Apr 8, 2014
1 parent 30cdb28 commit 98ebec1f61a49b0b9f55db8c633726cfc0170dc0
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 98ebec1

Please sign in to comment.