Skip to content
Browse files

Ensure we are looking with string keys

  • Loading branch information...
1 parent a5664fe commit 77692ff9c32c1b4999bd4ff51af6b84186729478 @chancancode chancancode committed
Showing with 1 addition and 1 deletion.
  1. +1 −1 activerecord/lib/active_record/enum.rb
View
2 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 77692ff

Please sign in to comment.
Something went wrong with that request. Please try again.