Sha256: 8c3b0698035330ab5def7d8fa1a882beb13064de956b480f87cf4ef9fbfa8ca0

Contents?: true

Size: 544 Bytes

Versions: 4

Compression:

Stored size: 544 Bytes

Contents

require 'titlezilla/translator'

module Titlezilla
  module Helpers
    module Title
      def title(override = nil)
        translator.title(override)
      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

4 entries across 4 versions & 1 rubygems

Version Path
titlezilla-0.1.4 lib/titlezilla/helpers/title.rb
titlezilla-0.1.3 lib/titlezilla/helpers/title.rb
titlezilla-0.1.2 lib/titlezilla/helpers/title.rb
titlezilla-0.1.1 lib/titlezilla/helpers/title.rb