Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
张重言
rails
提交
994ce87b
R
rails
项目概览
张重言
/
rails
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
R
rails
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
994ce87b
编写于
10月 03, 2016
作者:
I
Iain Beeston
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Moved database-specific ActiveModel types into ActiveRecord
ie. DecimalWithoutScale, Text and UnsignedInteger
上级
159b7748
变更
8
隐藏空白更改
内联
并排
Showing
8 changed file
with
33 addition
and
12 deletion
+33
-12
activemodel/CHANGELOG.md
activemodel/CHANGELOG.md
+4
-0
activemodel/lib/active_model/type.rb
activemodel/lib/active_model/type.rb
+0
-4
activerecord/CHANGELOG.md
activerecord/CHANGELOG.md
+4
-0
activerecord/lib/active_record/type.rb
activerecord/lib/active_record/type.rb
+3
-3
activerecord/lib/active_record/type/decimal_without_scale.rb
activerecord/lib/active_record/type/decimal_without_scale.rb
+9
-0
activerecord/lib/active_record/type/text.rb
activerecord/lib/active_record/type/text.rb
+9
-0
activerecord/lib/active_record/type/unsigned_integer.rb
activerecord/lib/active_record/type/unsigned_integer.rb
+2
-2
activerecord/test/cases/type/unsigned_integer_test.rb
activerecord/test/cases/type/unsigned_integer_test.rb
+2
-3
未找到文件。
activemodel/CHANGELOG.md
浏览文件 @
994ce87b
*
Moved DecimalWithoutScale, Text, and UnsignedInteger from Active Model to Active Record
*Iain Beeston*
*
Removed deprecated
`:tokenizer`
in the length validator.
*Rafael Mendonça França*
...
...
activemodel/lib/active_model/type.rb
浏览文件 @
994ce87b
...
...
@@ -7,14 +7,11 @@
require
"active_model/type/date"
require
"active_model/type/date_time"
require
"active_model/type/decimal"
require
"active_model/type/decimal_without_scale"
require
"active_model/type/float"
require
"active_model/type/immutable_string"
require
"active_model/type/integer"
require
"active_model/type/string"
require
"active_model/type/text"
require
"active_model/type/time"
require
"active_model/type/unsigned_integer"
require
"active_model/type/registry"
...
...
@@ -53,7 +50,6 @@ def lookup(*args, **kwargs) # :nodoc:
register
(
:immutable_string
,
Type
::
ImmutableString
)
register
(
:integer
,
Type
::
Integer
)
register
(
:string
,
Type
::
String
)
register
(
:text
,
Type
::
Text
)
register
(
:time
,
Type
::
Time
)
end
end
activerecord/CHANGELOG.md
浏览文件 @
994ce87b
*
Moved DecimalWithoutScale, Text, and UnsignedInteger from Active Model to Active Record
*Iain Beeston*
*
Fixed support for case insensitive comparisons of
`text`
columns in
PostgreSQL.
...
...
activerecord/lib/active_record/type.rb
浏览文件 @
994ce87b
...
...
@@ -7,7 +7,10 @@
require
"active_record/type/date"
require
"active_record/type/date_time"
require
"active_record/type/decimal_without_scale"
require
"active_record/type/time"
require
"active_record/type/text"
require
"active_record/type/unsigned_integer"
require
"active_record/type/serialized"
require
"active_record/type/adapter_specific_registry"
...
...
@@ -54,12 +57,9 @@ def current_adapter_name
Binary
=
ActiveModel
::
Type
::
Binary
Boolean
=
ActiveModel
::
Type
::
Boolean
Decimal
=
ActiveModel
::
Type
::
Decimal
DecimalWithoutScale
=
ActiveModel
::
Type
::
DecimalWithoutScale
Float
=
ActiveModel
::
Type
::
Float
Integer
=
ActiveModel
::
Type
::
Integer
String
=
ActiveModel
::
Type
::
String
Text
=
ActiveModel
::
Type
::
Text
UnsignedInteger
=
ActiveModel
::
Type
::
UnsignedInteger
register
(
:big_integer
,
Type
::
BigInteger
,
override:
false
)
register
(
:binary
,
Type
::
Binary
,
override:
false
)
...
...
active
model/lib/active_model
/type/decimal_without_scale.rb
→
active
record/lib/active_record
/type/decimal_without_scale.rb
浏览文件 @
994ce87b
require
"active_model/type/big_integer"
module
ActiveModel
module
ActiveRecord
module
Type
class
DecimalWithoutScale
<
BigInteger
# :nodoc:
class
DecimalWithoutScale
<
ActiveModel
::
Type
::
BigInteger
# :nodoc:
def
type
:decimal
end
...
...
active
model/lib/active_model
/type/text.rb
→
active
record/lib/active_record
/type/text.rb
浏览文件 @
994ce87b
require
"active_model/type/string"
module
ActiveModel
module
ActiveRecord
module
Type
class
Text
<
String
# :nodoc:
class
Text
<
ActiveModel
::
Type
::
String
# :nodoc:
def
type
:text
end
...
...
active
model/lib/active_model
/type/unsigned_integer.rb
→
active
record/lib/active_record
/type/unsigned_integer.rb
浏览文件 @
994ce87b
module
Active
Model
module
Active
Record
module
Type
class
UnsignedInteger
<
Integer
# :nodoc:
class
UnsignedInteger
<
ActiveModel
::
Type
::
Integer
# :nodoc:
private
def
max_value
...
...
active
model
/test/cases/type/unsigned_integer_test.rb
→
active
record
/test/cases/type/unsigned_integer_test.rb
浏览文件 @
994ce87b
require
"cases/helper"
require
"active_model/type"
module
Active
Model
module
Active
Record
module
Type
class
UnsignedIntegerTest
<
Active
Model
::
TestCase
class
UnsignedIntegerTest
<
Active
Record
::
TestCase
test
"unsigned int max value is in range"
do
assert_equal
(
4294967295
,
UnsignedInteger
.
new
.
serialize
(
4294967295
))
end
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录