find_one(id) private

No documentation

This method has no description. You can help the Ruby on Rails community by adding new notes.

Hide source
# File activerecord/lib/active_record/relation/finder_methods.rb, line 449
      def find_one(id)
        if ActiveRecord::Base === id
          raise ArgumentError,             You are passing an instance of ActiveRecord::Base to `find`.            Please pass the id of the object by calling `.id`..squish
        end

        relation = where(primary_key => id)
        record = relation.take

        raise_record_not_found_exception!(id, 0, 1) unless record

        record
      end
Register or log in to add new notes.