Sha256: 3da7e5cc54a8e9ab54d6e3742bcaaae46af35bf5fe75f1cb2185f406c7e3da6a

Contents?: true

Size: 513 Bytes

Versions: 1

Compression:

Stored size: 513 Bytes

Contents

# coding: utf-8
# frozen_string_literal: true

# Load the library.
require 'google/webfonts'
require 'google/webfonts/link_tag'

Google::Webfonts::LinkTag.define_method(:to_s) do
  # The default implmentation will escape the HTML when used with Rails.
  # This override ensures that the HTML is actually included document
  # rather than displayed as text in the browser.
  to_html.html_safe
end

# Include the webfonts helper methods in the Rails view helpers.
ActionView::Base.include(Google::Webfonts::Helper)

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
google-webfonts-0.3.1 lib/google/webfonts/rails.rb