ホーム > Rails > Rails4→5で目にしたdeprecationたち。

Rails4→5で目にしたdeprecationたち。 このエントリーを含むはてなブックマーク はてなブックマーク - Rails4→5で目にしたdeprecationたち。

2016 年 8 月 24 日

なにかの役に立つかも知れないので、淡淡と書いておきます。

DEPRECATION WARNING: Method map is deprecated and will be removed in Rails 5.1, as `ActionController::Parameters` no longer inherits from hash. Using this deprecated behavior exposes potential security problems. If you continue to use this method you may be creating a security vulnerability in your app that can be exploited. Instead, consider using one of these documented methods which are not deprecated: http://api.rubyonrails.org/v5.0.0.1/classes/ActionController/Parameters.html

DEPRECATION WARNING: uniq is deprecated and will be removed from Rails 5.1 (use distinct instead)

DEPRECATION WARNING: `redirect_to :back` is deprecated and will be removed from Rails 5.1. Please use `redirect_back(fallback_location: fallback_location)` where `fallback_location` represents the location to use if the request has no HTTP referer information.

DEPRECATION WARNING: `render :text` is deprecated because it does not actually render a `text/plain` response. Switch to `render plain: 'plain text'` to render as `text/plain`, `render html: '<strong>HTML</strong>'` to render as `text/html`, or `render body: 'raw'` to match the deprecated behavior and render with the default Content-Type, which is `text/plain`.

DEPRECATION WARNING: xhr and xml_http_request methods are deprecated in favor of `get :index, xhr: true` and `post :create, xhr: true`

DEPRECATION WARNING: ActionController::TestCase HTTP request methods will accept only keyword arguments in future Rails versions.
Examples:
get :show, params: { id: 1 }, session: { user_id: 1 }
process :update, method: :post, params: { id: 1 }


カテゴリー: Rails タグ:
コメントは受け付けていません。