Commit d11a19b9d194999c2be5a1eb4862c7c33ea498e7

Authored by Rodrigo Souto
1 parent ce5d736e

box: fix and avoid instance/class confusions

Showing 1 changed file with 4 additions and 4 deletions   Show diff stats
app/models/box.rb
... ... @@ -10,8 +10,8 @@ class Box < ActiveRecord::Base
10 10 end
11 11  
12 12 def acceptable_blocks
13   - blocks = central? ? Box.acceptable_center_blocks + plugins.dispatch(:extra_blocks, :position => 1) : Box.acceptable_side_blocks + plugins.dispatch(:extra_blocks, :position => [2, 3])
14   - to_css_class_name(blocks)
  13 + blocks_classes = central? ? Box.acceptable_center_blocks + plugins.dispatch(:extra_blocks, :position => 1) : Box.acceptable_side_blocks + plugins.dispatch(:extra_blocks, :position => [2, 3])
  14 + to_css_class_name(blocks_classes)
15 15 end
16 16  
17 17 def central?
... ... @@ -77,8 +77,8 @@ class Box < ActiveRecord::Base
77 77  
78 78 private
79 79  
80   - def to_css_class_name(blocks)
81   - blocks.map{ |block| block.class.name.to_css_class }
  80 + def to_css_class_name(blocks_classes)
  81 + blocks_classes.map{ |block_class| block_class.name.to_css_class }
82 82 end
83 83  
84 84 end
... ...