Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
张重言
rails
提交
bef16522
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,体验更适合开发者的 AI 搜索 >>
提交
bef16522
编写于
2月 07, 2016
作者:
V
Vijay Dev
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'master' of github.com:rails/docrails
上级
5b1f3e5b
87f060a7
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
16 addition
and
15 deletion
+16
-15
activerecord/lib/active_record/reflection.rb
activerecord/lib/active_record/reflection.rb
+13
-10
activerecord/test/cases/migration_test.rb
activerecord/test/cases/migration_test.rb
+0
-2
activesupport/lib/active_support/deprecation/proxy_wrappers.rb
...esupport/lib/active_support/deprecation/proxy_wrappers.rb
+2
-2
guides/source/association_basics.md
guides/source/association_basics.md
+1
-1
未找到文件。
activerecord/lib/active_record/reflection.rb
浏览文件 @
bef16522
...
...
@@ -124,8 +124,19 @@ def clear_reflections_cache # :nodoc:
end
end
# Holds all the methods that are shared between MacroReflection, AssociationReflection
# and ThroughReflection
# Holds all the methods that are shared between MacroReflection and ThroughReflection.
#
# AbstractReflection
# MacroReflection
# AggregateReflection
# AssociationReflection
# HasManyReflection
# HasOneReflection
# BelongsToReflection
# HasAndBelongsToManyReflection
# ThroughReflection
# PolymorphicReflection
# RuntimeReflection
class
AbstractReflection
# :nodoc:
def
table_name
klass
.
table_name
...
...
@@ -232,14 +243,6 @@ def alias_candidate(name)
# Base class for AggregateReflection and AssociationReflection. Objects of
# AggregateReflection and AssociationReflection are returned by the Reflection::ClassMethods.
#
# MacroReflection
# AggregateReflection
# AssociationReflection
# HasManyReflection
# HasOneReflection
# BelongsToReflection
# ThroughReflection
class
MacroReflection
<
AbstractReflection
# Returns the name of the macro.
#
...
...
activerecord/test/cases/migration_test.rb
浏览文件 @
bef16522
...
...
@@ -192,8 +192,6 @@ def test_add_table_with_decimals
# of 0, they take on the compile-time limit for precision and scale,
# so the following should succeed unless you have used really wacky
# compilation options
# - SQLite2 has the default behavior of preserving all data sent in,
# so this happens there too
assert_kind_of
BigDecimal
,
b
.
value_of_e
assert_equal
BigDecimal
(
"2.7182818284590452353602875"
),
b
.
value_of_e
elsif
current_adapter?
(
:SQLite3Adapter
)
...
...
activesupport/lib/active_support/deprecation/proxy_wrappers.rb
浏览文件 @
bef16522
...
...
@@ -80,7 +80,7 @@ def warn(callstack, called, args)
# example.old_request.to_s
# # => DEPRECATION WARNING: @request is deprecated! Call request.to_s instead of
# @request.to_s
# (Bactrace information…)
# (Bac
k
trace information…)
# "special_request"
#
# example.request.to_s
...
...
@@ -118,7 +118,7 @@ def warn(callstack, called, args)
#
# PLANETS.map { |planet| planet.capitalize }
# # => DEPRECATION WARNING: PLANETS is deprecated! Use PLANETS_POST_2006 instead.
# (Bactrace information…)
# (Bac
k
trace information…)
# ["Mercury", "Venus", "Earth", "Mars", "Jupiter", "Saturn", "Uranus", "Neptune"]
class
DeprecatedConstantProxy
<
DeprecationProxy
def
initialize
(
old_const
,
new_const
,
deprecator
=
ActiveSupport
::
Deprecation
.
instance
)
...
...
guides/source/association_basics.md
浏览文件 @
bef16522
...
...
@@ -726,7 +726,7 @@ class Author < ApplicationRecord
has_many
:books
,
inverse_of: :author
end
class
b
ook
<
ApplicationRecord
class
B
ook
<
ApplicationRecord
belongs_to
:author
,
inverse_of: :books
end
```
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录