blog-gem 0.1.5 → 0.1.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/controllers/blog/gem/blog_controller.rb +2 -2
- data/lib/blog/gem/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6030e35b6749b5b45cd53682f686465ea1c1c160
|
4
|
+
data.tar.gz: 53e0234b0cc799aea1387cc3a849d7933a8d9641
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3ddf0b8eb03af59fa71037646668119f6cdd602d8d04d8470517736cfe25ef503f7be58b5a63b24a651be2a9465d478372e8a505964c16115e0a6c81e43759f5
|
7
|
+
data.tar.gz: 63434b853097d0cf509ceeb5d72f98ebb91dd9b444c7d1b0a422d2bb1fb95ec7eba70d33443d9613ff3864dbfd59f1e9b85d78f5617b03d4c9cdc607d92e7f35
|
@@ -36,7 +36,7 @@ class Blog::Gem::BlogController < Blog::Gem::ApplicationController
|
|
36
36
|
end
|
37
37
|
format.json do
|
38
38
|
@posts = posts.published.all
|
39
|
-
render json: @posts.map{|x| {id: x.id, title: x.title, teaser: x.teaser, url: x.url, tags: x.tags, category: x.category, author: x.author_name, thumbnail: x.image_url}}
|
39
|
+
render json: @posts.map{|x| {id: x.id, title: x.title, teaser: x.teaser, url: x.url, tags: x.tags, category: x.category, author: x.author_name, thumbnail: x.image_url, published_at: x.published_at}}
|
40
40
|
end
|
41
41
|
format.html do
|
42
42
|
@current_path = blogs_path
|
@@ -62,7 +62,7 @@ class Blog::Gem::BlogController < Blog::Gem::ApplicationController
|
|
62
62
|
def api
|
63
63
|
@post = Blog::Gem::Post.find_by_id(params[:id])
|
64
64
|
if @post.present? && @post.published_at <= Time.now
|
65
|
-
render json: {status: 200, id: @post.id, title: @post.title, teaser: @post.teaser, url: @post.url, tags: @post.tags, category: @post.category, author: @post.author_name, thumbnail: @post.image_url, body: @post.body}
|
65
|
+
render json: {status: 200, id: @post.id, title: @post.title, teaser: @post.teaser, url: @post.url, tags: @post.tags, category: @post.category, author: @post.author_name, thumbnail: @post.image_url, body: @post.body, published_at: @post.published_at}
|
66
66
|
else
|
67
67
|
render json: {status: 404}
|
68
68
|
end
|
data/lib/blog/gem/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: blog-gem
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Vincent Thelang
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2017-09-
|
12
|
+
date: 2017-09-18 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rails
|