Created
August 13, 2014 16:36
-
-
Save danmartens/e28e4be471f697dd829e to your computer and use it in GitHub Desktop.
Rails Livereload Helper
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module LivereloadHelper | |
def livereload_script_tag | |
ip = Socket.ip_address_list.detect { |intf| intf.ipv4_private? } | |
ip ? content_tag(:script, nil, src: "http://#{ip.ip_address}:35729/livereload.js?snipver=1") : '' | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment