ActiveRecord and postgres lateral joins

Hi,

Is there any way to use PostgreSQL LATERAL joins (http://www.postgresql.org/docs/9.3/static/queries-table-expressions.html#QUERIES-LATERAL) with AR#eager_load on associations, to achieve partial eager loading?

My situation is: I have 2 models groups and users link together with a has_many :trough models memberships. When I list the groups, I want to eager load only the membership of the current user if it exists. Using this postgres function is the best way I have come up with.

Any thoughts?