Module: BootstrapCDN::Rails::CDN::ActionViewExtensions

Defined in:
lib/bootstrap-cdn-rails/action_view_helpers.rb

Constant Summary collapse

OFFLINE =
( ::Rails.env.development? )
BOOTSTRAP_VERSIONS =
[ "3.0.3", "3.0.2", "3.0.1", "3.0.0", "2.3.2" ]
FONTAWESOME_VERSIONS =
[ '4.0.3', '3.2.1' ]

Instance Method Summary collapse

Instance Method Details

#boostrap_css_include_tag(options = {version: BOOTSTRAP_VERSIONS.first}) ⇒ Object



8
9
10
# File 'lib/bootstrap-cdn-rails/action_view_helpers.rb', line 8

def boostrap_css_include_tag(options = {version: BOOTSTRAP_VERSIONS.first})
  stylesheet_link_tag("//netdna.bootstrapcdn.com/bootstrap/#{options[:version]}/css/bootstrap.min.css", options)
end

#boostrap_js_include_tag(options = {version: BOOTSTRAP_VERSIONS.first}) ⇒ Object



12
13
14
# File 'lib/bootstrap-cdn-rails/action_view_helpers.rb', line 12

def boostrap_js_include_tag(options = {version: BOOTSTRAP_VERSIONS.first})
  javascript_include_tag("//netdna.bootstrapcdn.com/bootstrap/#{options[:version]}/js/bootstrap.min.js", options)
end

#bootswatch_css_include_tag(options = {version: BOOTSTRAP_VERSIONS.first, name: "cosmo"}) ⇒ Object



20
21
22
# File 'lib/bootstrap-cdn-rails/action_view_helpers.rb', line 20

def bootswatch_css_include_tag(options = {version: BOOTSTRAP_VERSIONS.first, name: "cosmo"})
  stylesheet_link_tag("//netdna.bootstrapcdn.com/bootswatch/#{options[:version]}/#{options[:name]}/bootstrap.min.css", options)
end

#fontawesome_css_include_tag(options = {version: FONTAWESOME_VERSIONS.first}) ⇒ Object



16
17
18
# File 'lib/bootstrap-cdn-rails/action_view_helpers.rb', line 16

def fontawesome_css_include_tag(options = {version: FONTAWESOME_VERSIONS.first})
  stylesheet_link_tag("//netdna.bootstrapcdn.com/font-awesome/#{options[:version]}/css/font-awesome.min.css", options)
end