app/helpers/half_pipe_helper.rb in half-pipe-0.2.0 vs app/helpers/half_pipe_helper.rb in half-pipe-0.2.1

- old
+ new

@@ -1,8 +1,12 @@ module HalfPipeHelper def requirejs_include_tag(script, options={}) - root = if Rails.application.config.half_pipe.serve_assets then "components/requirejs" else "scripts" end - javascript_include_tag "/#{root}/require.js", { data: { main: script } } + script, options = if Rails.application.config.half_pipe.serve_assets + ["/components/requirejs/require.js", { data: { main: "/scripts/application.js" } }] + else + ["/scripts/application.js", {}] + end + javascript_include_tag script, options end end