ilog 0.2.2 → 0.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/ilog/controllers/index/index.rb +4 -4
- data/lib/ilog/models/item.rb +4 -3
- data/lib/ilog/models/post.rb +3 -4
- data/lib/ilog/models/stuff.rb +3 -3
- data/lib/ilog/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a59357fc2d646d76b131e85407422af3723483b49485ca796615b5f1cc09927f
|
4
|
+
data.tar.gz: f62e7875dace03f9f9e29b8a28d0f0404f88279feb620845da45ace9d097a283
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4c812f5beae0e8745fe4e9c20551c88039ab7ee268af5fdc901fc047ec00fac37566db56e7900650eaf491280875425fd0609f9544815e46fd4e031fd98d0b41
|
7
|
+
data.tar.gz: ec0f17d1b33b42908290b875a55b0d69f01a5e388bba9c29ff69838ec5cc1265aa0df36343cdefe61edec6da3da47878fd32c9c45140db604e00ebd14cf9c307
|
@@ -15,12 +15,12 @@ module Ilog
|
|
15
15
|
def perform function, params, input = nil
|
16
16
|
# @posts = ::Post.send(function, input)
|
17
17
|
# @stuffs = ::Stuff.send(function, input)
|
18
|
-
@posts = ::Post.
|
19
|
-
@stuffs = ::Stuff.
|
18
|
+
@posts = ::Post.includes(['title', 'slug', 'timestamp', 'peoples', 'keywords']).all
|
19
|
+
@stuffs = ::Stuff.includes(['title', 'slug', 'timestamp', 'peoples', 'keywords']).all
|
20
20
|
|
21
21
|
@posts.merge @stuffs
|
22
22
|
|
23
|
-
@items = @posts.order('timestamps.publish')
|
23
|
+
@items = @posts.order('timestamps.publish DESC')
|
24
24
|
@items = self.paginate(@items, params)
|
25
25
|
|
26
26
|
@count = {
|
@@ -69,7 +69,7 @@ module Ilog
|
|
69
69
|
|
70
70
|
return {
|
71
71
|
'current_page' => @page,
|
72
|
-
'data' => JSON.parse(@items_selected.to_json(:include =>
|
72
|
+
'data' => JSON.parse(@items_selected.to_json(:include => ['title', 'slug', 'timestamp', 'peoples', 'keywords'], :methods => [:kind, :uniq])),
|
73
73
|
'first_page_url' => '', # $this->url(1),
|
74
74
|
'from' => '', # $this->firstItem(),
|
75
75
|
'last_page' => @last_page, #$this->lastPage(),
|
data/lib/ilog/models/item.rb
CHANGED
data/lib/ilog/models/post.rb
CHANGED
@@ -1,8 +1,7 @@
|
|
1
1
|
require 'iatelier/models/book'
|
2
2
|
|
3
3
|
class Post < Book
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
@@roles = ['mention']
|
4
|
+
DIMENSIONS = ['title', 'slug', 'timestamp']
|
5
|
+
GROUPINGS = ['peoples', 'keywords']
|
6
|
+
ROLES = ['mention']
|
8
7
|
end
|
data/lib/ilog/models/stuff.rb
CHANGED
@@ -2,7 +2,7 @@ require 'iatelier/models/book'
|
|
2
2
|
|
3
3
|
class Stuff < Book
|
4
4
|
include Item
|
5
|
-
|
6
|
-
|
7
|
-
|
5
|
+
DIMENSIONS = ['title', 'slug', 'timestamp']
|
6
|
+
GROUPINGS = ['peoples', 'keywords']
|
7
|
+
ROLES = ['mention', 'author']
|
8
8
|
end
|
data/lib/ilog/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ilog
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- captainhusaynpinguin
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-01-
|
11
|
+
date: 2020-01-25 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: Providing a digital log implementation of traditional paper baed logs.
|
14
14
|
email:
|