Created
December 17, 2014 20:33
-
-
Save jimsynz/9b8f8d05823aec6576fd to your computer and use it in GitHub Desktop.
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
| module AssetsHelper | |
| def inline_asset name | |
| Rails.application.assets.find_asset(name).source | |
| end | |
| end |
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
| Rails.application.assets.context_class.class_eval do | |
| include AssetsHelper | |
| end |
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
| scope = {} | |
| (-> `<%= inline_asset 'messagerocket/channel' %>`).call(scope) | |
| Channel = scope.Channel |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment