Don't assume sprockets is loaded

Fixes #12
This commit is contained in:
andrew morton 2016-09-08 09:34:47 -06:00
parent 0309ff2166
commit 198257f510

View File

@ -7,7 +7,9 @@ module SwaggerRails
initializer 'swagger_rails.initialize' do |app|
middleware.use SwaggerJson, SwaggerRails.config
app.config.assets.precompile += [ 'swagger-ui/*' ]
if app.config.respond_to?(:assets)
app.config.assets.precompile += [ 'swagger-ui/*' ]
end
end
end
end