Module: Breakfast::ViewHelper

Defined in:
lib/breakfast/view_helper.rb

Instance Method Summary collapse

Instance Method Details

#breakfast_autoreload_tagObject



3
4
5
6
7
8
9
10
11
12
13
# File 'lib/breakfast/view_helper.rb', line 3

def breakfast_autoreload_tag
  if Rails.configuration.breakfast.environments.include?(Rails.env)
     :script do
      "        window.Breakfast = window.Breakfast || {};\n        window.Breakfast.liveReload = \#{Rails.configuration.breakfast.live_reload};\n        require(\"breakfast-rails\").init();\n      SCRIPT\n    end\n  end\nend\n".html_safe