mirror of
https://github.com/TracksApp/tracks.git
synced 2026-01-04 08:18:50 +01:00
Access MIME types via hash lookup instead of constant
Use a constant to look up a mime type is deprecated. Co-Authored-By: Dan Rice <dnrce@users.noreply.github.com>
This commit is contained in:
parent
2f85a42f91
commit
7fe0cf271a
4 changed files with 13 additions and 13 deletions
|
|
@ -43,9 +43,9 @@ class TodosController < ApplicationController
|
|||
render :action => 'index'.freeze
|
||||
end
|
||||
format.text do
|
||||
# somehow passing Mime::TEXT using content_type to render does not work
|
||||
headers['Content-Type'.freeze]=Mime::TEXT.to_s
|
||||
render :content_type => Mime::TEXT
|
||||
# somehow passing Mime[:text] using content_type to render does not work
|
||||
headers['Content-Type'.freeze]=Mime[:text].to_s
|
||||
render :content_type => Mime[:text]
|
||||
end
|
||||
format.xml do
|
||||
@xml_todos = params[:limit_to_active_todos] ? @not_done_todos : @todos
|
||||
|
|
@ -670,7 +670,7 @@ class TodosController < ApplicationController
|
|||
cookies[:mobile_url]= {:value => request.fullpath, :secure => SITE_CONFIG['secure_cookies']}
|
||||
}
|
||||
format.text {
|
||||
render :action => 'index', :layout => false, :content_type => Mime::TEXT
|
||||
render :action => 'index', :layout => false, :content_type => Mime[:text]
|
||||
}
|
||||
end
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue