I have a HABTM relationship between my agents and listings tables. Each
listing can have many agents and each agent can have many listings. In
the agents_listings table I have a column called ‘is_primary_agent’
which denotes if the agent is responsible for the listing - only one
agent can be primary.
At the moment I use this in my listing_controller’s view action:
@listing = Listing.find(@params[:id], :include => [ :agents,
:listing_images, :listing_pdfs ] )
What is the best, most efficient way to have this attribute appear
against my agents?