module Breakfast::Helper

Public Instance Methods

breakfast_autoreload_tag() click to toggle source
# File lib/breakfast/helper.rb, line 3
    def breakfast_autoreload_tag
      if ::Rails.configuration.breakfast.environments.include?(::Rails.env)
        content_tag :script do
          <<-SCRIPT.html_safe
            require("breakfast-rails").init({
              host: "#{request.host}",
              port: #{request.port},
              strategies: {
                js: "#{::Rails.configuration.breakfast.js_reload_strategy}",
                css: "#{::Rails.configuration.breakfast.css_reload_strategy}",
                html: "#{::Rails.configuration.breakfast.html_reload_strategy}",
                rb: "#{::Rails.configuration.breakfast.ruby_reload_strategy}"
              },
              statusBarLocation: "#{::Rails.configuration.breakfast.status_bar_location}"
            });
          SCRIPT
        end
      end
    end
compute_asset_path(path, options = {}) click to toggle source
Calls superclass method
# File lib/breakfast/helper.rb, line 26
def compute_asset_path(path, options = {})
  if ::Rails.configuration.breakfast.digest && ::Rails.configuration.breakfast.manifest.asset(path)
    path = ::Rails.configuration.breakfast.manifest.asset(path)
  end

  super(path, options)
end