0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

Railsのバージョンによってfindの挙動が違う件

Posted at

Rails 5.0.0.1でModel.find(nil)とやると、

ActiveRecord::RecordNotFound in ...
Couldn't find Model without an ID

とエラーが返ってくる。

古いRailsではModel.find(nil)で例外がraiseされないようなのだが、どのバージョンで切り替わったのかが知りたい。今度先輩に聞いてみよう。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?