提交 77692ff9 编写于 作者: G Godfrey Chan

Ensure we are looking with string keys

上级 a5664fe2
...@@ -139,7 +139,7 @@ def _enum_methods_module ...@@ -139,7 +139,7 @@ def _enum_methods_module
mod = Module.new do mod = Module.new do
private private
def save_changed_attribute(attr_name, value) 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) if attribute_changed?(attr_name)
old = changed_attributes[attr_name] old = changed_attributes[attr_name]
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册