intridea/grape — pull request #230 by RobTaylor76 (2012-08-21 15:20:08+00:00)
Title: Ability to combine a :using  and a :proc when exposing etntiy attributes

I need the ability to use a proc to return a specific result and represent it with a entity.

The code did not seem to support the following ...

expose :filtered_friends, :proc => lambda {|fresh_klass,options| fresh_klass.friends[0]}, :using => EntitySpec::FriendEntity

I have added a test for this and the code to implement it. Abit of a rails noob so maybe it might need refactoring?