Module: Kinney::GeneralHelper
- Defined in:
- app/helpers/kinney/general_helper.rb
Instance Method Summary collapse
- #action?(*action) ⇒ Boolean
- #controller?(*controller) ⇒ Boolean
- #current_url ⇒ Object
- #meta_description ⇒ Object
- #render_extra_head_content ⇒ Object
- #title ⇒ Object
Instance Method Details
#action?(*action) ⇒ Boolean
8 9 10 |
# File 'app/helpers/kinney/general_helper.rb', line 8 def action?(*action) action.include?(params[:action]) end |
#controller?(*controller) ⇒ Boolean
4 5 6 |
# File 'app/helpers/kinney/general_helper.rb', line 4 def controller?(*controller) controller.include?(params[:controller]) end |
#current_url ⇒ Object
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_description ⇒ Object
18 19 20 21 22 |
# File 'app/helpers/kinney/general_helper.rb', line 18 def if @meta_description %Q{<meta name="description" content="#{h @meta_description}">}.html_safe end end |
#render_extra_head_content ⇒ Object
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 |
#title ⇒ Object
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 |