diff options
author | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2014-01-21 20:35:21 -0200 |
---|---|---|
committer | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2014-01-21 20:35:21 -0200 |
commit | 55f6c8c908fea2609cbc8503f8d87460fd1b16b4 (patch) | |
tree | ef5b88a3aa9b87728acf4033c55ba0bd60dfb64f /activerecord/lib/active_record | |
parent | 5620e62f3f1920e70199a870a0a3c4feaedb9f98 (diff) | |
download | rails-55f6c8c908fea2609cbc8503f8d87460fd1b16b4.tar.gz rails-55f6c8c908fea2609cbc8503f8d87460fd1b16b4.tar.bz2 rails-55f6c8c908fea2609cbc8503f8d87460fd1b16b4.zip |
Use string as keys
Diffstat (limited to 'activerecord/lib/active_record')
-rw-r--r-- | activerecord/lib/active_record/enum.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/activerecord/lib/active_record/enum.rb b/activerecord/lib/active_record/enum.rb index 77a5fe9ae0..53dde5e564 100644 --- a/activerecord/lib/active_record/enum.rb +++ b/activerecord/lib/active_record/enum.rb @@ -66,7 +66,7 @@ module ActiveRecord DEFINED_ENUMS = {} # :nodoc: def enum_mapping_for(attr_name) # :nodoc: - DEFINED_ENUMS[attr_name.to_sym] + DEFINED_ENUMS[attr_name.to_s] end def enum(definitions) @@ -114,7 +114,7 @@ module ActiveRecord define_method("#{value}!") { update! name => value } end - DEFINED_ENUMS[name] = enum_values + DEFINED_ENUMS[name.to_s] = enum_values end end end |