Module: Kinney::GeneralHelper

Defined in:
app/helpers/kinney/general_helper.rb

Instance Method Summary collapse

Instance Method Details

#action?(*action) ⇒ Boolean

Returns:

  • (Boolean)


8
9
10
# File 'app/helpers/kinney/general_helper.rb', line 8

def action?(*action)
  action.include?(params[:action])
end

#controller?(*controller) ⇒ Boolean

Returns:

  • (Boolean)


4
5
6
# File 'app/helpers/kinney/general_helper.rb', line 4

def controller?(*controller)
  controller.include?(params[:controller])
end

#current_urlObject



30
31
32
# File 'app/helpers/kinney/general_helper.rb', line 30

def current_url
  "#{request.protocol}#{request.host_with_port}#{request.fullpath}"
end

#meta_descriptionObject



18
19
20
21
22
# File 'app/helpers/kinney/general_helper.rb', line 18

def meta_description
  if @meta_description
    %Q{<meta name="description" content="#{h @meta_description}">}.html_safe
  end
end

#render_extra_head_contentObject



24
25
26
27
28
# File 'app/helpers/kinney/general_helper.rb', line 24

def render_extra_head_content
  respond_to?(:extra_head_content) ?
    extra_head_content.join("\n").html_safe :
    ""
end

#titleObject



12
13
14
15
16
# File 'app/helpers/kinney/general_helper.rb', line 12

def title
  title_s = ''
  title_s << "#{@title} - " if @title
  title_s << application_name
end