paginative 0.0.7 → 0.0.8
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/paginative/models/model_extension.rb +1 -0
- data/lib/paginative/version.rb +1 -1
- data/spec/dummy/db/test.sqlite3 +0 -0
- data/spec/dummy/log/test.log +9152 -36036
- metadata +1 -5
- data/spec/dummy/db/development.sqlite3 +0 -0
- data/spec/dummy/log/development.log +0 -83
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 50ae7b425433ba6ce629752c3648cf7e45dca111
|
4
|
+
data.tar.gz: 3868c57e3e2146e4b4c5afb4c237d755e2353496
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9f3886ed72499cf45372c4040d0da5675f5c034818605c71323ca365b6bf09a24b2960aae424db669bc7ca5d0cc9e233f491a2bba7a749e8d64b1567ad8b0837
|
7
|
+
data.tar.gz: 7b16a2e5ded25b7deb22b68226963b28b1cd28942a9e1dfa2952ba033bb6e1b2e9d41af86f9e3b4ae0e4cafb844a56c4a55c27065519d1db5f9adaa90be58719
|
@@ -20,6 +20,7 @@ module Paginative
|
|
20
20
|
end
|
21
21
|
|
22
22
|
def self.with_field_from(field="", value="", limit=25, order="asc")
|
23
|
+
field = "#{self.name.tableize}.#{field}"
|
23
24
|
return self.order("#{field} DESC").where("#{field} < '#{value}'").limit(limit) if order == "desc"
|
24
25
|
self.order("#{field} ASC").where("#{field} > '#{value}'").limit(limit)
|
25
26
|
end
|
data/lib/paginative/version.rb
CHANGED
data/spec/dummy/db/test.sqlite3
CHANGED
Binary file
|