Module: Cyborg::Helpers::LayoutHelper
- Defined in:
- lib/cyborg/helpers/layout_helpers.rb
Instance Method Summary collapse
- #javascripts(&block) ⇒ Object
- #layout(name, options = {}, &block) ⇒ Object
- #main(options = {}, &block) ⇒ Object
- #sidebar(&block) ⇒ Object
- #stylesheets(&block) ⇒ Object
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, ={}, &block) layout = .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(={}, &block) content_for :main, &block end |
#sidebar(&block) ⇒ Object
22 23 24 |
# File 'lib/cyborg/helpers/layout_helpers.rb', line 22 def (&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 |