Flowdock
method

find_first

Importance_0
v4.0.2 - Show latest stable - 0 notes - Class: ActiveRecord::FinderMethods
find_first() protected

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 319
    def find_first
      if loaded?
        @records.first
      else
        @first ||=
          if with_default_scope.order_values.empty? && primary_key
            order(arel_table[primary_key].asc).limit(1).to_a.first
          else
            limit(1).to_a.first
          end
      end
    end
Register or log in to add new notes.