find_by() & find()

find_by() returns a single instance, not an array.Movie.find_by(id:3).title will return the title of the movie with id 3. if the id doesnt exist, it returns "nil".find() also returns a single instance...
0 Read More