🕵️‍♀️ Task

Select the director record with the id 3.

movies

  • id (integer)
  • title (string)
  • year (integer)
  • duration (integer)
  • description (text)
  • image (string)
  • director_id (integer)

directors

  • id (integer)
  • name (string)
  • dob (date)
  • bio (text)
  • image (string)

actors

  • id (integer)
  • name (string)
  • dob (date)
  • bio (text)
  • image (string)

characters

  • id (integer)
  • actor_id (integer)
  • movie_id (integer)
  • name (string)
📖Method

The find method searches for a row/record by it’s primary key (conventionally named id). The find method requires an argument that will be used to look up the object from the table.

class Movie < ActiveRecord::Base end
class Director < ActiveRecord::Base end
class Actor < ActiveRecord::Base end
class Character < ActiveRecord::Base end