method

sole

Importance_1
v7.1.3.4 - Show latest stable - 0 notes - Class: ActiveRecord::FinderMethods
sole() public

Finds the sole matching record. Raises ActiveRecord::RecordNotFound if no record is found. Raises ActiveRecord::SoleRecordExceeded if more than one record is found.

Product.where(["price = %?", price]).sole
Show source
Register or log in to add new notes.