Reputation: 5977
I have a folder in the root of my rails 4.1.1 project called coverage that shows all of my test coverage. I was hoping to set up a route to get to this, but since it's not in the public folder, it doesn't work. I have the following route defined...
get '/rspec', :to => redirect('/coverage/index.html')
Is this possible to do? If so, how? Thanks.
Upvotes: 2
Views: 936
Reputation: 3985
To do this you can use Rack::Static
by adding this to your config/application.rb
:
config.middleware.use Rack::Static, :urls => ['/coverage'], :root => Rails.root.to_s
Upvotes: 1
Reputation: 24367
You could symlink the coverage directory into your public directory
ln -nfs coverage public/coverage
Upvotes: 0