Module: ViewSlots::Helper

Defined in:
lib/view_slots/helper.rb

Instance Method Summary collapse

Instance Method Details

#slot(name, options = {}) ⇒ Object



4
5
6
7
8
9
10
11
# File 'lib/view_slots/helper.rb', line 4

def slot(name, options={})
  return '' unless slot = ::ViewSlots.find(name)
  returning "" do |content|
    slot.templates.each do |template|
      content.concat render(options.merge(:partial => template))
    end
  end
end