module FontAwesome::Rails::CDN::ActionViewExtensions

Constants

DEFAULT_HOST
FONTAWESOME_VERSIONS
OFFLINE

Public Instance Methods

fontawesome_stylesheet_url(host = DEFAULT_HOST, options = {}) click to toggle source
# File lib/fontawesome-rails-cdn/action_view_helpers.rb, line 7
def fontawesome_stylesheet_url(host = DEFAULT_HOST, options = {})
  fontawesome_cdn_url(host, options)
end

Private Instance Methods

fontawesome_cdn_url(host, options = {}) click to toggle source
# File lib/fontawesome-rails-cdn/action_view_helpers.rb, line 24
def fontawesome_cdn_url(host, options = {})
  version  = options[:version] || FONTAWESOME_VERSIONS.first

  {
    :netdna => "//netdna.bootstrapcdn.com/font-awesome/#{version}/css/font-awesome.min.css",
    :local  => "font-awesome-#{version}.min.css"
  }[host]
end