Skip to content

Instantly share code, notes, and snippets.

@teitei-tk
Created June 15, 2014 15:32
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save teitei-tk/289bf0fa713059a61ebf to your computer and use it in GitHub Desktop.
Save teitei-tk/289bf0fa713059a61ebf to your computer and use it in GitHub Desktop.
Railsでvendor/assets/javascripts以下にあるファイルを特定のページでのみ使用する ref: http://qiita.com/teitei_tk/items/bf444c6aa6398bde83bf
....
<%= javascript_include_tag 'hoge.js', 'data-turbolinks-track' => true %>
....
Rails.application.config.assets.precompile += [
"hoge.js",
]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment