aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib
diff options
context:
space:
mode:
authorSean Griffin <sean@seantheprogrammer.com>2016-06-24 06:16:46 -0400
committerGitHub <noreply@github.com>2016-06-24 06:16:46 -0400
commit382704987223754f0ede7fc1e327e44531a77f43 (patch)
tree2b9c14a425ce33607e1fdbd79241bb15a552edc7 /activerecord/lib
parent4bf3534b0356a416b648d601b1db6e8a131c7fc2 (diff)
parent8f290092f088c66a88addf82e0b4cdb88b64e854 (diff)
downloadrails-382704987223754f0ede7fc1e327e44531a77f43.tar.gz
rails-382704987223754f0ede7fc1e327e44531a77f43.tar.bz2
rails-382704987223754f0ede7fc1e327e44531a77f43.zip
Merge pull request #25506 from y-yagi/return_correct_from_enum_type
return correct type from `EnumType`
Diffstat (limited to 'activerecord/lib')
-rw-r--r--activerecord/lib/active_record/enum.rb2
1 files changed, 2 insertions, 0 deletions
diff --git a/activerecord/lib/active_record/enum.rb b/activerecord/lib/active_record/enum.rb
index 7be332fb97..b884edf920 100644
--- a/activerecord/lib/active_record/enum.rb
+++ b/activerecord/lib/active_record/enum.rb
@@ -105,6 +105,8 @@ module ActiveRecord
end
class EnumType < Type::Value # :nodoc:
+ delegate :type, to: :subtype
+
def initialize(name, mapping, subtype)
@name = name
@mapping = mapping