yuba 0.0.1 → 0.0.2

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: a0f50e10de1c64847c7dfb2087e0b8ca416ed1d5
4
- data.tar.gz: f1d38de018095e4b0651a0c80c842cadb2070e20
3
+ metadata.gz: 338f5b0c508bb1e8df93486999e6d06025f0efdd
4
+ data.tar.gz: 69e9080eeddb78312be8475bd71f078aaae6947c
5
5
  SHA512:
6
- metadata.gz: 4e2b3a1cb8b9f0ac254f67d504ddf99ffc47b02d322e7eded4a1475597eb8f6374c08c59e19ec39662dd2446c299973237ec8f46fa8cc6bd62e1d22bdfe57406
7
- data.tar.gz: 8673f827dd5ecf5a140bfe8774b92de85bdf20bb9f2ff1feb894dc55f1fb8f7ffd01ea4105e9060d72f26b286650678d74da30739c9b6f36e118ce171b36c0fa
6
+ metadata.gz: b5418fb02dd94930ed5b273bbbaf77cf4dad46d89c0bafb84bf4a2257d76266fb1987a19c8671aeed71bae4f78b068c991942a24797318ff59773a4880554fbf
7
+ data.tar.gz: 104a17016bbc0a247f03ff21a4e87eab9fcc7c2a4f86c0d10618cc8a32fb2b8d10d572805a8a938ce5932e44b51834e5834c8ac27f32f6f9ce9a9f3f72cb4f3c
data/README.md CHANGED
@@ -80,7 +80,7 @@ Property is default to private. This means you can use it in internal the instan
80
80
  You can use ViewModel in a controller like following
81
81
 
82
82
  ```ruby
83
- class PostsController
83
+ class PostsController < ApplicationController
84
84
  def show
85
85
  @view_model = PostViewModel.new(post: post, author: 'willnet')
86
86
  end
@@ -90,7 +90,7 @@ end
90
90
  In view template, if you want to access post and author, you have to use `@view_model` instance variable like `@view_model.post.title`. if it feels troublesome, you can write like following
91
91
 
92
92
  ```ruby
93
- class PostsController
93
+ class PostsController < ApplicationController
94
94
  def show
95
95
  view_model = PostViewModel.new(post: post, author: 'willnet')
96
96
  render view_model: view_model
@@ -2,7 +2,7 @@ module Yuba
2
2
  module Rendering
3
3
  def render(*args)
4
4
  view_model_hash = args.find { |arg| arg.is_a?(Hash) && arg[:view_model] }
5
- @_view_model = view_model_hash[:view_model] if view_model_hash[:view_model]
5
+ @_view_model = view_model_hash[:view_model] if view_model_hash && view_model_hash[:view_model]
6
6
  super
7
7
  end
8
8
 
@@ -1,3 +1,3 @@
1
1
  module Yuba
2
- VERSION = '0.0.1'
2
+ VERSION = '0.0.2'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: yuba
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - willnet
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-12-01 00:00:00.000000000 Z
11
+ date: 2017-12-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails