Sha256: 56f27f4a96d3fca5ac5f9a635731e697fb9a719e643d438c3fd422d93242fff2
Contents?: true
Size: 681 Bytes
Versions: 37
Compression:
Stored size: 681 Bytes
Contents
# These helper methods can be called in your template to set variables to be used in the layout # This module should be included in all views globally, # to do so you may need to add this line to your ApplicationController # helper :layout module LayoutHelper def title(page_title, show_title = true) @content_for_title = page_title.to_s @show_title = show_title end def show_title? @show_title end def stylesheet(*args) content_for(:head) { stylesheet_link_tag(*args.map(&:to_s)) } end def javascript(*args) args = args.map { |arg| arg == :defaults ? arg : arg.to_s } content_for(:head) { javascript_include_tag(*args) } end end
Version data entries
37 entries across 37 versions & 9 rubygems