method

first

rails latest stable - Class: ActiveRecord::Result

Method deprecated or moved

This method is deprecated or moved on the latest stable version. The last existing version (v6.0.0) is shown here.

first()
public

Returns the first record from the rows collection. If the rows collection is empty, returns nil.