Collection Proxy
通过某个对象,对其关联的对象进行操作。 它继承于 Relation,只是稍微做封装,所以接口上也有很多类似之处。
对外提供接口。
有破坏行为:
<< & push & append
prepend
to_a & to_ary
reset
replace
reload
create
create!
delete
delete_all
destroy
destroy_all
clear仅是结果:
查询:
其它:
最后更新于
这有帮助吗?
通过某个对象,对其关联的对象进行操作。 它继承于 Relation,只是稍微做封装,所以接口上也有很多类似之处。
对外提供接口。
有破坏行为:
<< & push & append
prepend
to_a & to_ary
reset
replace
reload
create
create!
delete
delete_all
destroy
destroy_all
clear仅是结果:
查询:
其它:
最后更新于
这有帮助吗?
这有帮助吗?
count
any?
many?
empty?
length
size
include?
loaded?
==new & build
concat
distinct & uniq
find
first
last
second
third
fourth
fifth
forty_two
scope & spawn
scoping
select
takearel
target
load_target
proxy_association