assaf/vanity

Rails 5 Deprecation Warning

Closed this issue · 0 comments

On a brand new Rails 5.0.1 app I get the following when visiting the vanity dashboard.

DEPRECATION WARNING: Accessing mime types via constants is deprecated. Please change `Mime::HTML` to `Mime[:html]`. (called from const_missing at /Users/<snip>/.rvm/gems/ruby-2.3.1/gems/actionpack-5.0.0.1/lib/action_dispatch/http/mime_type.rb:52)

Offending lines are located at:

render :file=>Vanity.template("_report"),:content_type=>Mime::HTML, :locals=>{
:experiments=>Vanity.playground.experiments,
:experiments_persisted=>Vanity.playground.experiments_persisted?,
:metrics=>Vanity.playground.metrics
}
end
def participant
render :file=>Vanity.template("_participant"), :locals=>{:participant_id => params[:id], :participant_info => Vanity.playground.participant_info(params[:id])}, :content_type=>Mime::HTML