firstdraft / appdev_template

A Rails template for generating homework projects
0 stars 1 forks source link

Refine string representation fo `ActiveRecord::Relation` #95

Closed raghubetina closed 4 years ago

raghubetina commented 4 years ago

Right now, something like Photo.all will display something like

=> Array containing 323 Photo records

This patch proposes slightly different copy,

=> Photo::ActiveRecord_Relation (array with 323 Photo instances inside)

I suggest we do this along with splitting up the ActiveRecord Chapter into multiple chapters:

And then we keep using the term "relation" heavily, rather than "array" or "collection", and demonstrate doing .class often after .all or .where or .order.

Thoughts?

jelaniwoods commented 4 years ago

LGTM 🚀 I intend to merge these changes in today.