jbuilder-jpartial 0.2.2 → 0.2.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 42e8fbd77867fa4d90c7d865f933b404a329f3fb
4
- data.tar.gz: 3e7f13140faae6c03e01e9015aaff88fcc2883d9
3
+ metadata.gz: b3b16018a2a317dd73d9b7c335f36bb5617b4a71
4
+ data.tar.gz: 32a5d28866d2253646d97d6b7c88c4e47352f9f7
5
5
  SHA512:
6
- metadata.gz: 534e7ce5e4c792f5dd3fd1a2d6658d02f83ceac15eb56f5b401c5577fc221a655d03487250f5d05885cde5156c31ab6cf9b469e32dda6c3dbcc5bc5ba321b43c
7
- data.tar.gz: 466c8f6948aceeadd94cbfdda4a938510acf60d484e1140e34f3bd7afc48f24733076f0f2441e0314637b3dd041c923e6828c517ede6fd79bc1d360fc82c7fbd
6
+ metadata.gz: 3ae11bfc5c2936ab47a50b5875bcb8c481a75a582db3d0be1e300dd9586685688542910191ed0872db8654ed79aae45ffb1a970607ec65ef3e0b34e3df6bcd8c
7
+ data.tar.gz: 1642559e330f11d60c8dc6da29213e1642dc30e51fad449e75cc058da9b489b65f2fc7971419dc2e9bfec7115e5ff4e4adf06fb0e603ab6a03992f2293efde97
data/README.md CHANGED
@@ -78,7 +78,7 @@ The result is faster rendering and lower memory usage, while still being able to
78
78
 
79
79
  Alternatively you can define all partials in one initializer file and call them wherever you need them: from within other partial definitions or anywhere you use `Jbuilder` in your views. The advantage here is fewer files, all partials in one place, and since they're initialized at start up, you don't need to call any additional view templates to render the partials. Using the same example as above:
80
80
 
81
- #### In `app/config/initializers/jbuilder-jpartial.rb`
81
+ #### In `app/config/initializers/jpartial.rb`
82
82
  ```ruby
83
83
  Jbuilder::Jpartial.configure do |jpartial|
84
84
  jpartial._post do |post|
@@ -106,7 +106,7 @@ end
106
106
 
107
107
  Notice that when using this method, we don't make any calls like `json.partial! 'post'` at any point to define the partial before using it. All of the partials are already defined in the initializer file.
108
108
 
109
- The advantage is a couple fewer renders. The disadvantage is that helper methods that are available in the views are not available in the configuration file.
109
+ The advantage is even fewer renders and faster responses. The only real disadvantage is it bucks the regular Rails partial conventions. C'est la vie.
110
110
 
111
111
  #### How?
112
112
  Each method you call on `jpartial` defines a Jbuilder method of the same name. The objects you will pass to that method are yielded to the block. Inside the block you can use plain old Jbuilder syntax.
@@ -1,5 +1,5 @@
1
1
  class Jbuilder
2
2
  module Jpartial
3
- VERSION = '0.2.2'.freeze
3
+ VERSION = '0.2.3'.freeze
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jbuilder-jpartial
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.2
4
+ version: 0.2.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - M. Simon Borg