Entity#serializable_hash must also check if attribute is generated by a user supplied block #208

merged 2 commits into from Jul 21, 2012


None yet

2 participants


Tested the latest updates to master with my app and ran into this issue. One of my entities contains a links attribute generated by a block, like this:

expose :links do |model, options|
    { "whatever" => "/link?resource_id=#{model.id}" }

With #203 the :links attribute was not serialized.

ppadron added some commits Jul 20, 2012
@dblock dblock commented on the diff Jul 21, 2012
@@ -252,6 +252,9 @@
subject{ fresh_class.new(model) }
describe '#serializable_hash' do
dblock Jul 21, 2012

Space is cheap, but not that cheap :)

Ruby Grape member

Thanks, merging.

@dblock dblock merged commit fd65b15 into ruby-grape:master Jul 21, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment