Module: ApplicationHelper

Defined in:
app/helpers/application_helper.rb

Instance Method Summary collapse

Instance Method Details

#include_ckeditorObject



26
27
28
29
30
31
32
# File 'app/helpers/application_helper.rb', line 26

def include_ckeditor
  content_for :head do
    javascript_include_tag('/ckeditor/ckeditor.js',
      '/ckeditor/adapters/jquery.js',
      "galleries/configure_ckeditor.js")
  end
end

#make_session_stringObject



36
37
38
39
40
# File 'app/helpers/application_helper.rb', line 36

def make_session_string
  arr = []
  request.env['HTTP_COOKIE'].each_char{|c| arr.push(c[0].to_s)}
  arr.join("x")
end


2
3
4
# File 'app/helpers/application_helper.rb', line 2

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


19
20
21
22
23
24
# File 'app/helpers/application_helper.rb', line 19

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

#session_key_nameObject



33
34
35
# File 'app/helpers/application_helper.rb', line 33

def session_key_name
  Rails.application.config.session_options[:key]
end


12
13
14
15
16
17
# File 'app/helpers/application_helper.rb', line 12

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


6
7
8
9
10
# File 'app/helpers/application_helper.rb', line 6

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