Sha256: 3c4cb0a5719418f45b30b311576578a456ce54c1b3b75ab43c21eeb11f664ae4

Contents?: true

Size: 727 Bytes

Versions: 4

Compression:

Stored size: 727 Bytes

Contents

module Kinney
  module GeneralHelper

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

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

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

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

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

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

  end  
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
kinney-0.1.1 app/helpers/kinney/general_helper.rb
kinney-0.1.0 app/helpers/kinney/general_helper.rb
kinney-0.0.3 app/helpers/kinney/general_helper.rb
kinney-0.0.2 app/helpers/kinney/general_helper.rb