pragma icon indicating copy to clipboard operation
pragma copied to clipboard

Model(): Support lookup by custom attributes

Open aldesantis opened this issue 7 years ago • 1 comments

We should support the following formats:

step Model(invoice_id: :id) # WHERE invoice_id = params[:invoice_id] AND id = params[:id]
step Model(:id) # WHERE id = params[:id]
step Model(:slug, :id) # WHERE slug = params[:id] OR id = params[:id]

aldesantis avatar Dec 17 '17 13:12 aldesantis

This has actually been introduced in TRB itself in trailblazer-macro, so we can just wait for 2.1.

aldesantis avatar Jun 24 '18 17:06 aldesantis