You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Valium is a great idea. But my most frequent use case of .map(&:column) is across an entire collection, not a custom relation. Semantically, it'd be nicer if I could do these:
User[:name]
User.posts[:id]
Instead of this:
User.scoped[:name]
User.posts.scoped[:id]
I'm not sure this is possible, since a model (User) is just a Class, and an association collection is just an Array - I assume you need them to become an ActiveRecord::Relation. But if it's possible to monkey patch into this, it'd be sweet.
The text was updated successfully, but these errors were encountered:
Valium is a great idea. But my most frequent use case of
.map(&:column)
is across an entire collection, not a custom relation. Semantically, it'd be nicer if I could do these:Instead of this:
I'm not sure this is possible, since a model (User) is just a
Class
, and an association collection is just anArray
- I assume you need them to become anActiveRecord::Relation
. But if it's possible to monkey patch into this, it'd be sweet.The text was updated successfully, but these errors were encountered: