Why is Model.associations an array but supports SQL queries?

As possible, if you have two models (Model and Association) with a "has_many" relationship, if you take the result: Model.associations, the object belongs to the Array class (if you check Model.associations. Class), but you can still add some query specs to it like Model.associations.where (...)?

+3


source to share





All Articles