Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Ensure we are looking with string keys

  • Loading branch information...
commit 77692ff9c32c1b4999bd4ff51af6b84186729478 1 parent a5664fe
@chancancode chancancode authored
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]
Please sign in to comment.
Something went wrong with that request. Please try again.