Created
October 8, 2008 04:24
-
-
Save moro/15445 to your computer and use it in GitHub Desktop.
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
# Methods added to this helper will be available to all templates in the application. | |
module ApplicationHelper | |
def javascript_include_file(filename) | |
if ::Rails.env == "development" | |
fullpath = File.expand_path("public/javascripts/#{filename}.js", ::Rails.root) | |
javascript_tag File.read(fullpath) | |
else | |
javascript_include_tag filename | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment