Skip to content

Commit

Permalink
Use Rails environment in /stats
Browse files Browse the repository at this point in the history
Use the `Rails.env` instead of `Sinatra::Application.environment`.

Sinatra depends on `APP_ENV` rather than `RAILS_ENV` and defaults to
`development` if no `APP_ENV` is set. This can lead to situations where
the host application is running in `production` but the dashboard is
showing `development`.

Fixes ejschmitt#112
  • Loading branch information
coffeejunk committed Dec 14, 2019
1 parent 7ff3ad4 commit 02fecfb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/delayed_job_web/application/views/stats.erb
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
environment
</th>
<th>
<%=h Sinatra::Application.environment.to_s %>
<%=h Rails.env.to_s %>
</th>
</tr>
<tr>
Expand Down

0 comments on commit 02fecfb

Please sign in to comment.