Quiz: Models I

Test your understanding of the concepts of models.

1

What is the best reason to create a scope on an Active Record?

A)

You can’t perform a query on that record’s underlying table any other way.

B)

It’s good form to put all code that uses that model on the model as a scope.

C)

Scopes have access to private APIs that you need to properly query the database.

D)

To centralize nonbusiness logic around how database data is interpreted.

Question 1 of 50 attempted

Get hands-on with 1200+ tech skills courses.