Sha256: f091947e820224d754031629948a20419cf102c1d38163f02e917d1a0a9881f9

Contents?: true

Size: 725 Bytes

Versions: 1

Compression:

Stored size: 725 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="#{@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

1 entries across 1 versions & 1 rubygems

Version Path
kinney-0.0.1 app/helpers/kinney/general_helper.rb