Skip to content

Commit

Permalink
/opal_spec should work even if source maps are disabled
Browse files Browse the repository at this point in the history
  • Loading branch information
elia committed Nov 2, 2013
1 parent b09d5f0 commit e7138dd
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions lib/opal/rails/engine.rb
Expand Up @@ -33,13 +33,13 @@ class Engine < ::Rails::Engine
Opal::Processor.send(key, value) if Opal::Processor.respond_to? key
end

if config.opal.source_map_enabled
maps_app = Opal::SourceMapServer.new(app.assets)

app.routes.prepend do
app.routes.prepend do
if config.opal.source_map_enabled
maps_app = Opal::SourceMapServer.new(app.assets)
mount maps_app => maps_app.prefix
get '/opal_spec' => 'opal_spec#run'
end

get '/opal_spec' => 'opal_spec#run'
end
end

Expand Down

0 comments on commit e7138dd

Please sign in to comment.