active_path-view_injection 0.1.1 → 0.1.2

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: b489ad0fe031fe6431bf494e074be55621e3dcc1
4
- data.tar.gz: bfa71869ac8dde8b445f1330bfe8bc638947cc48
3
+ metadata.gz: 32a7629fe3ab12303dc7e681b6afabeb31a42f77
4
+ data.tar.gz: 2e639c1a49fa789f1fbfb0fb5893e61f84a63f58
5
5
  SHA512:
6
- metadata.gz: 669fc690a2ac08534d4791ad03492dfe32d61d0166d75b5da7f3aeee0cbc3542cd7da2cc79453a3129be5def1e1fd39628a1e69d0a0d8dd3720f7a52177fdf64
7
- data.tar.gz: c22305a2c4945ebf00eee26da8dfdacac7f99346f26a0618e50cf1a646226c11518e9d98b37a82efec5fe7cc32fc28f5844a756e0dc955755dc73812658c43d8
6
+ metadata.gz: bc4f81f25a6f68a6f115e2c4fe95bf2539f93ee72db1e93b1612848e58be3173f413185bfd75c1551227d800ae7c4b93ceb450a3f4dee0ef90cab814f1186a19
7
+ data.tar.gz: a880da98d06cea7dde6e764aca72f2badf18c46cd3478b8c9070e56981227e9c66fb4365b99e08c8407e1970d0deafdb6e73bd3dda5bddcb26594d90311cf301
data/README.md CHANGED
@@ -43,7 +43,7 @@ Your partial will have the same local parameters access as the prepended partial
43
43
 
44
44
  ```ruby
45
45
 
46
- config.partials.append('pages/content').with('example/test')
46
+ ActivePath.append('pages/content').with('example/test')
47
47
 
48
48
  ```
49
49
 
@@ -64,7 +64,7 @@ You can pass in a hash which must match the local variables.
64
64
 
65
65
  ```ruby
66
66
 
67
- config.partials.append('pages/content').with('example/test').when(page_id: 9)
67
+ ActivePath.append('pages/content').with('example/test').when(page_id: 9)
68
68
 
69
69
  ```
70
70
 
@@ -72,7 +72,7 @@ Or pass in a block for more flexibility with your conditions:
72
72
 
73
73
  ```ruby
74
74
 
75
- config.partials.append('pages/content').with('example/test').when do |locals|
75
+ ActivePath.append('pages/content').with('example/test').when do |locals|
76
76
  locals[:page_id] == 9
77
77
  end
78
78
 
@@ -1 +1,9 @@
1
- require 'active_path/view_injection/engine'
1
+ require 'active_path/view_injection/engine'
2
+ module ActivePath
3
+ def self.prepend(partial)
4
+ config.partials.prepend(partial)
5
+ end
6
+ def self.append(partial)
7
+ config.partials.append(partial)
8
+ end
9
+ end
@@ -1,5 +1,5 @@
1
1
  module ActivePath
2
2
  module ViewInjection
3
- VERSION = '0.1.1'
3
+ VERSION = '0.1.2'
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: active_path-view_injection
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ryan Tulino