Module: Cyborg::Helpers::LayoutHelper

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

Instance Method Summary collapse

Instance Method Details

#javascripts(&block) ⇒ Object



12
13
14
# File 'lib/cyborg/helpers/layout_helpers.rb', line 12

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

#render_layout(*args, &block) ⇒ Object



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

def render_layout(*args, &block)
  options = args.last.is_a?(Hash) ? args.pop : {}
  layout = args.first || 'default'
  options[:template] = "layouts/#{layout}"
  yield if block_given?
  render options
end

#stylesheets(&block) ⇒ Object



16
17
18
# File 'lib/cyborg/helpers/layout_helpers.rb', line 16

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