ActiveRecord associations, scoped
ActiveRecord as a neat trick/ability which a lot of folks are not aware of. You can pass a block to... Tagged with rails, ruby.What makes this even more interesting is that you can have multiple associations to the same model with different name and conditions.
ActiveRecord associations, scoped #ruby #rubydeveloper #rubyonrails #activerecord https://rubyonrails.ba/single/activerecord-associations-scoped