paginative 0.0.13 → 0.0.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/paginative/models/model_extension.rb +1 -1
- data/lib/paginative/version.rb +1 -1
- data/spec/dummy/db/development.sqlite3 +0 -0
- data/spec/dummy/db/test.sqlite3 +0 -0
- data/spec/dummy/log/development.log +83 -0
- data/spec/dummy/log/test.log +36131 -11715
- metadata +7 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e0056e11001f48cbc8ccf544a3a775156f840a7d
|
4
|
+
data.tar.gz: cc1e0b91598649fa39cbeffeb658c06953cfad4f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f79802bdc3e203e4bf274758772a35cffa9092b4f0e7175625dfe87047fb158e0f033dc7cc6e11011c15703ed46d6fcba3453848ee209af5cee51c6f9a2a502d
|
7
|
+
data.tar.gz: a825fb430a8cd267714e7c3865db36a4091797ab25165e327bed978ae47b367d5206791b437b5b9428e0764f9210148225586c90bb0370aca323fe504128525c
|
@@ -12,7 +12,7 @@ module Paginative
|
|
12
12
|
|
13
13
|
def self.with_name_from(name="", limit=25, order="asc")
|
14
14
|
return self.order("name DESC").where("lower(name) < ?", name.downcase).offset(0).limit(limit) if order == "desc"
|
15
|
-
self.order(name: :asc).where("lower(name) > ?", name.downcase).offset(0).limit(limit)
|
15
|
+
self.order(name: :asc).where("lower(self.name.tableize.name) > ?", name.downcase).offset(0).limit(limit)
|
16
16
|
end
|
17
17
|
|
18
18
|
def self.with_id_from(id=0, limit=25)
|
data/lib/paginative/version.rb
CHANGED
Binary file
|
data/spec/dummy/db/test.sqlite3
CHANGED
Binary file
|
@@ -0,0 +1,83 @@
|
|
1
|
+
[1m[36m (2.0ms)[0m [1mCREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL) [0m
|
2
|
+
[1m[35m (0.4ms)[0m select sqlite_version(*)
|
3
|
+
[1m[36m (0.8ms)[0m [1mCREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")[0m
|
4
|
+
[1m[35mActiveRecord::SchemaMigration Load (0.1ms)[0m SELECT "schema_migrations".* FROM "schema_migrations"
|
5
|
+
Migrating to CreatePaginativeTestModels (20140415060518)
|
6
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
7
|
+
[1m[35m (0.6ms)[0m CREATE TABLE "paginative_test_models" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "latitude" float, "longitude" float, "created_at" datetime, "updated_at" datetime)
|
8
|
+
[1m[36mSQL (0.3ms)[0m [1mINSERT INTO "schema_migrations" ("version") VALUES (?)[0m [["version", "20140415060518"]]
|
9
|
+
[1m[35m (0.8ms)[0m commit transaction
|
10
|
+
[1m[36mActiveRecord::SchemaMigration Load (0.1ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
11
|
+
[1m[36mActiveRecord::SchemaMigration Load (0.3ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
12
|
+
[1m[35mActiveRecord::SchemaMigration Load (0.1ms)[0m SELECT "schema_migrations".* FROM "schema_migrations"
|
13
|
+
[1m[36m (1.1ms)[0m [1mCREATE TABLE "paginative_test_models" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "latitude" float, "longitude" float, "created_at" datetime, "updated_at" datetime) [0m
|
14
|
+
[1m[35m (0.9ms)[0m CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL)
|
15
|
+
[1m[36m (0.4ms)[0m [1mselect sqlite_version(*)[0m
|
16
|
+
[1m[35m (0.9ms)[0m CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
|
17
|
+
[1m[36m (0.1ms)[0m [1mSELECT version FROM "schema_migrations"[0m
|
18
|
+
[1m[35m (0.6ms)[0m INSERT INTO "schema_migrations" (version) VALUES ('20140415060518')
|
19
|
+
[1m[36m (1.2ms)[0m [1mCREATE TABLE "paginative_test_models" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "latitude" float, "longitude" float, "created_at" datetime, "updated_at" datetime) [0m
|
20
|
+
[1m[35m (2.8ms)[0m CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL)
|
21
|
+
[1m[36m (0.2ms)[0m [1mselect sqlite_version(*)[0m
|
22
|
+
[1m[35m (1.3ms)[0m CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
|
23
|
+
[1m[36m (0.2ms)[0m [1mSELECT version FROM "schema_migrations"[0m
|
24
|
+
[1m[35m (2.1ms)[0m INSERT INTO "schema_migrations" (version) VALUES ('20140415060518')
|
25
|
+
[1m[36m (1.0ms)[0m [1mCREATE TABLE "paginative_test_models" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "latitude" float, "longitude" float, "created_at" datetime, "updated_at" datetime) [0m
|
26
|
+
[1m[35m (0.9ms)[0m CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL)
|
27
|
+
[1m[36m (0.4ms)[0m [1mselect sqlite_version(*)[0m
|
28
|
+
[1m[35m (0.8ms)[0m CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
|
29
|
+
[1m[36m (0.1ms)[0m [1mSELECT version FROM "schema_migrations"[0m
|
30
|
+
[1m[35m (0.6ms)[0m INSERT INTO "schema_migrations" (version) VALUES ('20140415060518')
|
31
|
+
[1m[36mActiveRecord::SchemaMigration Load (1.9ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
32
|
+
Migrating to AddAddressToTestModels (20140416020706)
|
33
|
+
[1m[35m (0.1ms)[0m begin transaction
|
34
|
+
[1m[36m (0.2ms)[0m [1mALTER TABLE "test_models" ADD "address" varchar(255)[0m
|
35
|
+
SQLite3::SQLException: no such table: test_models: ALTER TABLE "test_models" ADD "address" varchar(255)
|
36
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
37
|
+
[1m[36mActiveRecord::SchemaMigration Load (0.1ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
38
|
+
Migrating to AddAddressToTestModels (20140416020706)
|
39
|
+
[1m[35m (0.1ms)[0m begin transaction
|
40
|
+
[1m[36m (3.0ms)[0m [1mALTER TABLE "paginative_test_models" ADD "address" varchar(255)[0m
|
41
|
+
[1m[35mSQL (0.3ms)[0m INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20140416020706"]]
|
42
|
+
[1m[36m (0.5ms)[0m [1mcommit transaction[0m
|
43
|
+
[1m[35mActiveRecord::SchemaMigration Load (0.1ms)[0m SELECT "schema_migrations".* FROM "schema_migrations"
|
44
|
+
[1m[36m (1.3ms)[0m [1mCREATE TABLE "paginative_test_models" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "latitude" float, "longitude" float, "created_at" datetime, "updated_at" datetime, "address" varchar(255)) [0m
|
45
|
+
[1m[36m (1.1ms)[0m [1mCREATE TABLE "paginative_test_models" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "latitude" float, "longitude" float, "created_at" datetime, "updated_at" datetime, "address" varchar(255)) [0m
|
46
|
+
[1m[35m (0.7ms)[0m CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL)
|
47
|
+
[1m[36m (0.3ms)[0m [1mselect sqlite_version(*)[0m
|
48
|
+
[1m[35m (0.8ms)[0m CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
|
49
|
+
[1m[36m (0.1ms)[0m [1mSELECT version FROM "schema_migrations"[0m
|
50
|
+
[1m[35m (0.6ms)[0m INSERT INTO "schema_migrations" (version) VALUES ('20140416020706')
|
51
|
+
[1m[36m (0.6ms)[0m [1mINSERT INTO "schema_migrations" (version) VALUES ('20140415060518')[0m
|
52
|
+
[1m[36mActiveRecord::SchemaMigration Load (0.3ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
53
|
+
[1m[35mActiveRecord::SchemaMigration Load (0.1ms)[0m SELECT "schema_migrations".* FROM "schema_migrations"
|
54
|
+
[1m[36m (0.9ms)[0m [1mCREATE TABLE "paginative_test_models" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "latitude" float, "longitude" float, "created_at" datetime, "updated_at" datetime, "address" varchar(255)) [0m
|
55
|
+
[1m[35m (0.9ms)[0m CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL)
|
56
|
+
[1m[36m (0.1ms)[0m [1mselect sqlite_version(*)[0m
|
57
|
+
[1m[35m (0.8ms)[0m CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
|
58
|
+
[1m[36m (0.1ms)[0m [1mSELECT version FROM "schema_migrations"[0m
|
59
|
+
[1m[35m (0.7ms)[0m INSERT INTO "schema_migrations" (version) VALUES ('20140416020706')
|
60
|
+
[1m[36m (0.6ms)[0m [1mINSERT INTO "schema_migrations" (version) VALUES ('20140415060518')[0m
|
61
|
+
[1m[36mActiveRecord::SchemaMigration Load (0.4ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
62
|
+
Migrating to CreateTestModels (20140416035443)
|
63
|
+
[1m[35m (0.1ms)[0m begin transaction
|
64
|
+
[1m[36m (1.0ms)[0m [1mCREATE TABLE "test_models" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "address" varchar(255), "latitude" float, "longitude" float, "created_at" datetime, "updated_at" datetime) [0m
|
65
|
+
[1m[35mSQL (0.2ms)[0m INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20140416035443"]]
|
66
|
+
[1m[36m (1.1ms)[0m [1mcommit transaction[0m
|
67
|
+
[1m[35mActiveRecord::SchemaMigration Load (0.1ms)[0m SELECT "schema_migrations".* FROM "schema_migrations"
|
68
|
+
[1m[36m (1.2ms)[0m [1mCREATE TABLE "paginative_test_models" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "latitude" float, "longitude" float, "created_at" datetime, "updated_at" datetime, "address" varchar(255)) [0m
|
69
|
+
[1m[35m (0.9ms)[0m CREATE TABLE "test_models" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "address" varchar(255), "latitude" float, "longitude" float, "created_at" datetime, "updated_at" datetime)
|
70
|
+
[1m[36m (0.8ms)[0m [1mCREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL) [0m
|
71
|
+
[1m[35m (0.1ms)[0m select sqlite_version(*)
|
72
|
+
[1m[36m (0.7ms)[0m [1mCREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")[0m
|
73
|
+
[1m[35m (0.1ms)[0m SELECT version FROM "schema_migrations"
|
74
|
+
[1m[36m (0.8ms)[0m [1mINSERT INTO "schema_migrations" (version) VALUES ('20140416035443')[0m
|
75
|
+
[1m[36m (1.6ms)[0m [1mCREATE TABLE "paginative_test_models" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "latitude" float, "longitude" float, "created_at" datetime, "updated_at" datetime, "address" varchar(255)) [0m
|
76
|
+
[1m[35m (0.9ms)[0m CREATE TABLE "test_models" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "address" varchar(255), "latitude" float, "longitude" float, "created_at" datetime, "updated_at" datetime)
|
77
|
+
[1m[36m (0.8ms)[0m [1mCREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL) [0m
|
78
|
+
[1m[35m (0.1ms)[0m select sqlite_version(*)
|
79
|
+
[1m[36m (0.8ms)[0m [1mCREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")[0m
|
80
|
+
[1m[35m (0.1ms)[0m SELECT version FROM "schema_migrations"
|
81
|
+
[1m[36m (0.9ms)[0m [1mINSERT INTO "schema_migrations" (version) VALUES ('20140416035443')[0m
|
82
|
+
[1m[36mActiveRecord::SchemaMigration Load (0.4ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
83
|
+
[1m[35mActiveRecord::SchemaMigration Load (0.1ms)[0m SELECT "schema_migrations".* FROM "schema_migrations"
|