Sha256: f4d208b36bd2d369fddb99c0d9cd579d1bfa5ad00e728bac79a0418ccea40b07

Contents?: true

Size: 518 Bytes

Versions: 1

Compression:

Stored size: 518 Bytes

Contents

require 'titlezilla/translator'

module Titlezilla
  module Helpers
    module Title
      def title
        translator.title
      end

      def application_title
        translator.application_title
      end

      def meta_title
        translator.meta_title
      end

      def title_tag
        content_tag :title, meta_title
      end

      private

      def translator
        @translator ||= Translator.new(controller_path, action_name, controller.view_assigns.symbolize_keys)
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
titlezilla-0.1.0 lib/titlezilla/helpers/title.rb