Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
张重言
rails
提交
c47a698d
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,发现更多精彩内容 >>
提交
c47a698d
编写于
7月 06, 2012
作者:
O
Oscar Del Ben
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Add nodoc to relation methods
上级
ca802fda
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
22 addition
and
24 deletion
+22
-24
activerecord/lib/active_record/relation/query_methods.rb
activerecord/lib/active_record/relation/query_methods.rb
+22
-24
未找到文件。
activerecord/lib/active_record/relation/query_methods.rb
浏览文件 @
c47a698d
...
...
@@ -35,7 +35,7 @@ def #{name}_value=(value) # def readonly_value=(value)
CODE
end
def
create_with_value
def
create_with_value
#:nodoc:
@values
[
:create_with
]
||
{}
end
...
...
@@ -56,7 +56,7 @@ def includes(*args)
args
.
empty?
?
self
:
spawn
.
includes!
(
*
args
)
end
def
includes!
(
*
args
)
def
includes!
(
*
args
)
#:nodoc:
args
.
reject!
{
|
a
|
a
.
blank?
}
self
.
includes_values
=
(
includes_values
+
args
).
flatten
.
uniq
...
...
@@ -67,7 +67,7 @@ def eager_load(*args)
args
.
blank?
?
self
:
spawn
.
eager_load!
(
*
args
)
end
def
eager_load!
(
*
args
)
def
eager_load!
(
*
args
)
#:nodoc:
self
.
eager_load_values
+=
args
self
end
...
...
@@ -76,7 +76,7 @@ def preload(*args)
args
.
blank?
?
self
:
spawn
.
preload!
(
*
args
)
end
def
preload!
(
*
args
)
def
preload!
(
*
args
)
#:nodoc:
self
.
preload_values
+=
args
self
end
...
...
@@ -93,7 +93,7 @@ def references(*args)
args
.
blank?
?
self
:
spawn
.
references!
(
*
args
)
end
def
references!
(
*
args
)
def
references!
(
*
args
)
#:nodoc:
args
.
flatten!
self
.
references_values
=
(
references_values
+
args
.
map!
(
&
:to_s
)).
uniq
...
...
@@ -137,7 +137,7 @@ def select(value = Proc.new)
end
end
def
select!
(
value
)
def
select!
(
value
)
#:nodoc:
self
.
select_values
+=
Array
.
wrap
(
value
)
self
end
...
...
@@ -158,7 +158,7 @@ def group(*args)
args
.
blank?
?
self
:
spawn
.
group!
(
*
args
)
end
def
group!
(
*
args
)
def
group!
(
*
args
)
#:nodoc:
args
.
flatten!
self
.
group_values
+=
args
...
...
@@ -179,7 +179,7 @@ def order(*args)
args
.
blank?
?
self
:
spawn
.
order!
(
*
args
)
end
def
order!
(
*
args
)
def
order!
(
*
args
)
#:nodoc:
args
.
flatten!
references
=
args
.
reject
{
|
arg
|
Arel
::
Node
===
arg
}
...
...
@@ -203,7 +203,7 @@ def reorder(*args)
args
.
blank?
?
self
:
spawn
.
reorder!
(
*
args
)
end
def
reorder!
(
*
args
)
def
reorder!
(
*
args
)
#:nodoc:
args
.
flatten!
self
.
reordering_value
=
true
...
...
@@ -215,7 +215,7 @@ def joins(*args)
args
.
compact
.
blank?
?
self
:
spawn
.
joins!
(
*
args
)
end
def
joins!
(
*
args
)
def
joins!
(
*
args
)
#:nodoc:
args
.
flatten!
self
.
joins_values
+=
args
...
...
@@ -226,7 +226,7 @@ def bind(value)
spawn
.
bind!
(
value
)
end
def
bind!
(
value
)
def
bind!
(
value
)
#:nodoc:
self
.
bind_values
+=
[
value
]
self
end
...
...
@@ -325,9 +325,7 @@ def where(opts, *rest)
opts
.
blank?
?
self
:
spawn
.
where!
(
opts
,
*
rest
)
end
# #where! is identical to #where, except that instead of returning a new relation, it adds
# the condition to the existing relation.
def
where!
(
opts
,
*
rest
)
def
where!
(
opts
,
*
rest
)
#:nodoc:
references!
(
PredicateBuilder
.
references
(
opts
))
if
Hash
===
opts
self
.
where_values
+=
build_where
(
opts
,
rest
)
...
...
@@ -338,7 +336,7 @@ def having(opts, *rest)
opts
.
blank?
?
self
:
spawn
.
having!
(
opts
,
*
rest
)
end
def
having!
(
opts
,
*
rest
)
def
having!
(
opts
,
*
rest
)
#:nodoc:
references!
(
PredicateBuilder
.
references
(
opts
))
if
Hash
===
opts
self
.
having_values
+=
build_where
(
opts
,
rest
)
...
...
@@ -354,7 +352,7 @@ def limit(value)
spawn
.
limit!
(
value
)
end
def
limit!
(
value
)
def
limit!
(
value
)
#:nodoc:
self
.
limit_value
=
value
self
end
...
...
@@ -370,7 +368,7 @@ def offset(value)
spawn
.
offset!
(
value
)
end
def
offset!
(
value
)
def
offset!
(
value
)
#:nodoc:
self
.
offset_value
=
value
self
end
...
...
@@ -379,7 +377,7 @@ def lock(locks = true)
spawn
.
lock!
(
locks
)
end
def
lock!
(
locks
=
true
)
def
lock!
(
locks
=
true
)
#:nodoc:
case
locks
when
String
,
TrueClass
,
NilClass
self
.
lock_value
=
locks
||
true
...
...
@@ -427,7 +425,7 @@ def readonly(value = true)
spawn
.
readonly!
(
value
)
end
def
readonly!
(
value
=
true
)
def
readonly!
(
value
=
true
)
#:nodoc:
self
.
readonly_value
=
value
self
end
...
...
@@ -436,7 +434,7 @@ def create_with(value)
spawn
.
create_with!
(
value
)
end
def
create_with!
(
value
)
def
create_with!
(
value
)
#:nodoc:
self
.
create_with_value
=
value
?
create_with_value
.
merge
(
value
)
:
{}
self
end
...
...
@@ -458,7 +456,7 @@ def from(value, subquery_name = nil)
spawn
.
from!
(
value
,
subquery_name
)
end
def
from!
(
value
,
subquery_name
=
nil
)
def
from!
(
value
,
subquery_name
=
nil
)
#:nodoc:
self
.
from_value
=
[
value
,
subquery_name
]
self
end
...
...
@@ -477,7 +475,7 @@ def uniq(value = true)
spawn
.
uniq!
(
value
)
end
def
uniq!
(
value
=
true
)
def
uniq!
(
value
=
true
)
#:nodoc:
self
.
uniq_value
=
value
self
end
...
...
@@ -526,7 +524,7 @@ def extending(*modules, &block)
end
end
def
extending!
(
*
modules
,
&
block
)
def
extending!
(
*
modules
,
&
block
)
#:nodoc:
modules
<<
Module
.
new
(
&
block
)
if
block_given?
self
.
extending_values
=
modules
.
flatten
...
...
@@ -542,7 +540,7 @@ def reverse_order
spawn
.
reverse_order!
end
def
reverse_order!
def
reverse_order!
#:nodoc:
self
.
reverse_order_value
=
!
reverse_order_value
self
end
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录