Module: Cyborg::Helpers::LayoutHelper

Defined in:
lib/cyborg/helpers/layout_helpers.rb

Instance Method Summary collapse

Instance Method Details

#javascripts(&block) ⇒ Object



10
11
12
# File 'lib/cyborg/helpers/layout_helpers.rb', line 10

def javascripts(&block)
  content_for :javascripts, &block
end

#layout(name, options = {}, &block) ⇒ Object



4
5
6
7
8
# File 'lib/cyborg/helpers/layout_helpers.rb', line 4

def layout(name, options={}, &block)
  layout = options.delete(:layout) || 'application'
  yield
  render template: "layouts/#{name}/#{layout}"
end

#main(options = {}, &block) ⇒ Object



18
19
20
# File 'lib/cyborg/helpers/layout_helpers.rb', line 18

def main(options={}, &block)
  content_for :main, &block
end


22
23
24
# File 'lib/cyborg/helpers/layout_helpers.rb', line 22

def sidebar(&block)
  content_for :sidebar, &block
end

#stylesheets(&block) ⇒ Object



14
15
16
# File 'lib/cyborg/helpers/layout_helpers.rb', line 14

def stylesheets(&block)
  content_for :stylesheets, &block
end