jb 0.6.0 → 0.6.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +1 -1
- data/README.md +4 -5
- data/jb.gemspec +1 -1
- data/lib/jb/handler.rb +2 -2
- data/lib/jb/version.rb +1 -1
- metadata +8 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 85a34b7b4a0cd8cd4bfd32bc44021c6047f7c78dc77b3bce9fafe43ab0d82830
|
4
|
+
data.tar.gz: de224b08f0492fa32932377cb7c4c4052a5160cb76e5c25b5f75da47be32602d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d7614ee922fd93b2d30fa51e8525da65a395c4a3dc82d26d535e53fe4a78886037b7ef0672bf417e56544242a06c31baec4d389e46385490767144a66038fa1c
|
7
|
+
data.tar.gz: b29639a9d5fbee1e1c0a77218dbfa110744dcf1b9819c26de0ead0b86c5afea3e696cf9122c804bf1e932ce27179cc11c3cd07e29ab614194f07b1c1f7aece76
|
data/.travis.yml
CHANGED
data/README.md
CHANGED
@@ -176,12 +176,11 @@ It's also possible to render collections of partials:
|
|
176
176
|
|
177
177
|
```ruby
|
178
178
|
render partial: 'posts/post', collection: @posts, as: :post
|
179
|
-
|
180
|
-
# or
|
181
|
-
|
182
|
-
render @post.comments
|
183
179
|
```
|
184
180
|
|
181
|
+
> NOTE: Don't use `render @post.comments` because if the collection is empty,
|
182
|
+
`render` will return `nil` instead of an empty array.
|
183
|
+
|
185
184
|
You can pass any objects into partial templates with or without `:locals` option.
|
186
185
|
|
187
186
|
```ruby
|
@@ -194,7 +193,7 @@ render 'sub_template', user: user
|
|
194
193
|
|
195
194
|
You can of course include Ruby `nil` as a Hash value if you want. That would become `null` in the JSON.
|
196
195
|
|
197
|
-
|
196
|
+
You can use `Hash#compact`/`!` method to prevent including `null` values in the output:
|
198
197
|
|
199
198
|
```ruby
|
200
199
|
{foo: nil, bar: 'bar'}.compact
|
data/jb.gemspec
CHANGED
@@ -23,7 +23,7 @@ Gem::Specification.new do |spec|
|
|
23
23
|
|
24
24
|
spec.add_dependency 'multi_json'
|
25
25
|
|
26
|
-
spec.add_development_dependency
|
26
|
+
spec.add_development_dependency 'bundler'
|
27
27
|
spec.add_development_dependency 'rake'
|
28
28
|
spec.add_development_dependency 'test-unit-rails'
|
29
29
|
spec.add_development_dependency 'rails'
|
data/lib/jb/handler.rb
CHANGED
data/lib/jb/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: jb
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.6.
|
4
|
+
version: 0.6.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Akira Matsuda
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-
|
11
|
+
date: 2019-03-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: multi_json
|
@@ -28,16 +28,16 @@ dependencies:
|
|
28
28
|
name: bundler
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- - "
|
31
|
+
- - ">="
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: '
|
33
|
+
version: '0'
|
34
34
|
type: :development
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
|
-
- - "
|
38
|
+
- - ">="
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version: '
|
40
|
+
version: '0'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: rake
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
@@ -144,7 +144,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
144
144
|
- !ruby/object:Gem::Version
|
145
145
|
version: '0'
|
146
146
|
requirements: []
|
147
|
-
|
147
|
+
rubyforge_project:
|
148
|
+
rubygems_version: 2.7.8
|
148
149
|
signing_key:
|
149
150
|
specification_version: 4
|
150
151
|
summary: Faster and simpler Jbuilder alternative
|