method
raise_record_not_found_exception!
v4.2.1 -
Show latest stable
- Class:
ActiveRecord::FinderMethods
raise_record_not_found_exception!(ids, result_size, expected_size)public
This method is called whenever no records are found with either a single id or multiple ids and raises a +ActiveRecord::RecordNotFound+ exception.
The error message is different depending on whether a single id or multiple ids are provided. If multiple ids are provided, then the number of results obtained should be provided in the result_size argument and the expected number of results should be provided in the expected_size argument.