activerecord-collections 0.0.5 → 0.0.6
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2abef191dff39cbfc9eea961ada24c900a468283
|
4
|
+
data.tar.gz: 6a5e84efad9a8ca109250a6b300dba9ef6dcc25d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 52972f40deada1316b689444eaa8fa2814184f0731ab64ff2b13605b8ae0a8fd685d53e0dbffa58401c209635c2289995d9cb0ed0230e5311af33be5a6a97102
|
7
|
+
data.tar.gz: fcc224924a45de375be95d92485bcfd5583a1f9fb838dc61670109a944a306cfd5d69c6a198c9e1e6aed83fbbeaf13455fefc15447f07c9f5bb893ff05b536c4
|
@@ -128,6 +128,20 @@ module ActiveRecord
|
|
128
128
|
self
|
129
129
|
end
|
130
130
|
|
131
|
+
# TODO make this not dependent on kaminari
|
132
|
+
def page!(*args)
|
133
|
+
@relation = relation.page(*args)
|
134
|
+
self
|
135
|
+
end
|
136
|
+
alias_method :page, :page!
|
137
|
+
|
138
|
+
def per!(*args)
|
139
|
+
@relation = relation.page((relation.offset_value / relation.limit_value) + 1).per(*args)
|
140
|
+
self
|
141
|
+
end
|
142
|
+
alias_method :per, :per!
|
143
|
+
# END kaminari
|
144
|
+
|
131
145
|
def joins(*args)
|
132
146
|
dup.joins!(*args)
|
133
147
|
end
|