blocks 1.0.1 → 1.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.
Files changed (2) hide show
  1. data/lib/blocks/builder.rb +9 -9
  2. metadata +4 -4
@@ -74,10 +74,10 @@ module Blocks
74
74
  block_container.options = options
75
75
  block_container.block = block
76
76
 
77
- if blocks[name].nil?
78
- blocks[name] = [block_container]
77
+ if view.blocks.blocks[name].nil?
78
+ view.blocks.blocks[name] = [block_container]
79
79
  else
80
- blocks[name] << block_container
80
+ view.blocks.blocks[name] << block_container
81
81
  end
82
82
 
83
83
  nil
@@ -92,10 +92,10 @@ module Blocks
92
92
  block_container.options = options
93
93
  block_container.block = block
94
94
 
95
- if blocks[name].nil?
96
- blocks[name] = [block_container]
95
+ if view.blocks.blocks[name].nil?
96
+ view.blocks.blocks[name] = [block_container]
97
97
  else
98
- blocks[name] << block_container
98
+ view.blocks.blocks[name] << block_container
99
99
  end
100
100
 
101
101
  nil
@@ -154,8 +154,8 @@ module Blocks
154
154
  end
155
155
 
156
156
  view.concat(render_before_blocks(name, options))
157
-
158
- if blocks[name]
157
+
158
+ if blocks[name]
159
159
  block_container = blocks[name]
160
160
  view.concat(view.capture shared_options.merge(block_container.options).merge(render_options), &block_container.block)
161
161
  elsif view.blocks.blocks[name]
@@ -177,7 +177,7 @@ module Blocks
177
177
  view.concat(render_after_blocks(name, options))
178
178
  end
179
179
 
180
- def render_before_blocks(name, options={})
180
+ def render_before_blocks(name, options={})
181
181
  name = "before_#{name.to_s}".to_sym
182
182
 
183
183
  unless blocks[name].nil?
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: blocks
3
3
  version: !ruby/object:Gem::Version
4
- hash: 21
4
+ hash: 19
5
5
  prerelease: false
6
6
  segments:
7
7
  - 1
8
8
  - 0
9
- - 1
10
- version: 1.0.1
9
+ - 2
10
+ version: 1.0.2
11
11
  platform: ruby
12
12
  authors:
13
13
  - Andrew Hunter
@@ -16,7 +16,7 @@ autorequire:
16
16
  bindir: bin
17
17
  cert_chain: []
18
18
 
19
- date: 2011-01-09 00:00:00 -05:00
19
+ date: 2011-01-10 00:00:00 -05:00
20
20
  default_executable:
21
21
  dependencies: []
22
22