aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record/enum.rb
diff options
context:
space:
mode:
authoryuuji.yaginuma <yuuji.yaginuma@gmail.com>2016-06-24 17:43:25 +0900
committeryuuji.yaginuma <yuuji.yaginuma@gmail.com>2016-06-24 17:43:25 +0900
commit8f290092f088c66a88addf82e0b4cdb88b64e854 (patch)
tree3ca99b1ab6990020628808b820d57f32eeacfed5 /activerecord/lib/active_record/enum.rb
parent48f896cd504331a5d1d78324a4b7d5969a06606e (diff)
downloadrails-8f290092f088c66a88addf82e0b4cdb88b64e854.tar.gz
rails-8f290092f088c66a88addf82e0b4cdb88b64e854.tar.bz2
rails-8f290092f088c66a88addf82e0b4cdb88b64e854.zip
return correct type from `EnumType`
Diffstat (limited to 'activerecord/lib/active_record/enum.rb')
-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