提交 338defb4 编写于 作者: J Jeremy Kemper

Respect type method. #5337

git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4593 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
上级 f801cd79
......@@ -21,16 +21,14 @@ def initialize(name, default, sql_type = nil, null = true)
@default = type_cast(default)
@primary = nil
@text = [:string, :text].include? @type
@number = [:float, :integer].include? @type
end
def text?
@text
[:string, :text].include? type
end
def number?
@number
[:float, :integer].include? type
end
# Returns the Ruby class that corresponds to the abstract data type.
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册