app/helpers/half_pipe_helper.rb in half-pipe-0.3.0.alpha.1 vs app/helpers/half_pipe_helper.rb in half-pipe-0.3.0.alpha.2
- old
+ new
@@ -1,12 +1,15 @@
module HalfPipeHelper
- def requirejs_include_tag(script, options={})
- script, options = if Rails.application.config.half_pipe.env.debug?
- ["/components/requirejs/require.js", { data: { main: "/assets/scripts/application.js" } }]
- else
- ["/assets/scripts/application.js", {}]
- end
- javascript_include_tag script, options
+ def javascript_include_tag(source, options={})
+ base = File.basename(source)
+ source = File.join("/assets", "scripts", base)
+ super source, options
+ end
+
+ def image_tag(source, options={})
+ base = File.basename(source)
+ source = File.join("/assets", "images", base)
+ super(source, options)
end
end