提交 38270498 编写于 作者: S Sean Griffin 提交者: GitHub

Merge pull request #25506 from y-yagi/return_correct_from_enum_type

return correct type from `EnumType`
......@@ -105,6 +105,8 @@ def inherited(base) # :nodoc:
end
class EnumType < Type::Value # :nodoc:
delegate :type, to: :subtype
def initialize(name, mapping, subtype)
@name = name
@mapping = mapping
......
......@@ -421,4 +421,8 @@ def self.name; 'Book'; end
book = Book.new
assert book.hard?
end
test "data type of Enum type" do
assert_equal :integer, Book.type_for_attribute('status').type
end
end
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册