Permalink
Browse files

Bugfix for JS file inclusion

  • Loading branch information...
sinisterchipmunk committed Mar 3, 2011
1 parent 2c9788d commit 07a1938c652a95eaa9514e804af4a03af28ca974
Showing with 2 additions and 2 deletions.
  1. +1 −1 lib/webgl/railtie.rb
  2. +1 −1 spec/views/webgl_inclusion_spec.rb
View
@@ -13,7 +13,7 @@ class Railtie < Rails::Railtie
end
config.before_configuration do
- config.action_view.javascript_expansions[:webgl] = Dir[File.join("javascripts/**/*.js")]
+ config.action_view.javascript_expansions[:webgl] = Dir[File.join(WebGL.public_path, "javascripts/**/*.js")].collect { |d| File.join("", d.gsub(Regexp::escape(WebGL.public_path), "")) }
end
# generators do
@@ -15,7 +15,7 @@
describe "webgl_tests/webgl_inclusion.html.erb" do
def src_for(str)
- File.expand_path(File.join(File.dirname(__FILE__), '../../public/javascripts', str))
+ File.expand_path(File.join('/javascripts', str))
end
it "includes all WebGL javascripts" do

0 comments on commit 07a1938

Please sign in to comment.