More Enumerable `first` and `last` for `ActiveRecord::Result`
`Result#first` was added at #25507. As I said at https://github.com/rails/rails/pull/25507#issuecomment-228446339, I still prefer less code, `Result#first` is used only in `select_one`, and `select_one` is not used in the codebase, i.e. `Result#first` and `Result#last` are not used in the codebase. I'd not prefer to have dedicated code for such like rarely used (almost unused) feature. Instead of having limited `Result#first` (doesn't allow number), I'd prefer to just use `Enumerable#first`.
Showing
想要评论请 注册 或 登录