Last active
August 29, 2015 14:10
-
-
Save costa/32496c17cb77b03cea8a to your computer and use it in GitHub Desktop.
Rails: loading asynchronous Pusher client-side (js) module: in app/views/layouts/application.html.haml
This file contains hidden or 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
| - if defined? PusherFake | |
| = javascript_tag File.read Dir.glob(File.expand_path 'features/support/application/public/javascripts/vendor/pusher-2.*.js', Bundler.load.specs.find{|s| s.name == 'pusher-fake' }.full_gem_path).last | |
| - else # NOTE Since Pusher is not really useful with no internet connection... let's CDN it | |
| %script{:src => "http://js.pusher.com/2.0/pusher.min.js", :defer => true} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment