Sha256: 87059cca784b51fc8ba9a7ecd23fb8fc59966a0503313d66ff9f1e7ebc0742d0

Contents?: true

Size: 958 Bytes

Versions: 2

Compression:

Stored size: 958 Bytes

Contents

module ApplicationHelper
  def menu_node(name, url)
    content_tag(:li, content_tag(:a, content_tag(:span, name, :class=>name.underscore.gsub(/ /, '_')), :href=>url))
  end

  def sidebar_link(name, url, is_title = false)
    _class = name.underscore.gsub(/ /, '_')
    _class += "sidebar_title" if is_title
    content_tag(:li, content_tag(:a, content_tag(:span, name, :class=>name.underscore), :href=>url), :class=>_class)
  end

  def sidebar_content(&block)
    @sidebar = true
    content_for(:sidebar) do
      block.call
    end
  end

  def include_ckeditor
    content_for :head do
      javascript_include_tag('/ckeditor/ckeditor.js',
        '/ckeditor/adapters/jquery.js',
        "galleries/configure_ckeditor.js")
    end
  end
  def session_key_name
    Rails.application.config.session_options[:key]
  end
  def make_session_string
    arr = []
    request.env['HTTP_COOKIE'].each_char{|c| arr.push(c[0].to_s)}
    arr.join("x")
  end

end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
wheels-0.1.10 app/helpers/application_helper.rb
wheels-0.1.9 app/helpers/application_helper.rb