intridea/grape — pull request #500 by yaneq (2013-11-06 02:20:09+00:00)
Title: Skip entity auto-detection when explicitely passed

The call to .first might cause an unnecessary db call

present SomeModel.active, with: Entities::SomeModel

__generated sql calls

Somemodel Load (1.0ms) SELECT [...] ORDER BY id LIMIT 1
Somemodel Load (0.4ms) SELECT [...] ORDER BY id

The first call is to determine the entity, which in this case is not necessary since it has been passed to `present`