Retrieve objects from the database

 

1 Retrieving Objects from the Database

To retrieve objects from the database, Active Record provides several finder methods. Each finder method allows you to pass arguments into it to perform certain queries on your database without writing raw SQL.

The methods are:

  • annotate
  • find
  • create_with
  • distinct
  • eager_load
  • extending
  • extract_associated
  • from
  • group
  • having
  • includes
  • joins
  • left_outer_joins
  • limit
  • lock
  • none
  • offset
  • optimizer_hints
  • order
  • preload
  • readonly
  • references
  • reorder
  • reselect
  • reverse_order
  • select
  • where




Comments

Popular posts from this blog

Rails 7 Features :: Comparison with Rails 6 and Rails 5