nesquena / rabl

General ruby templating with json, bson, xml, plist and msgpack support
http://blog.codepath.com/2011/06/27/building-a-platform-api-on-rails/
MIT License
3.64k stars 334 forks source link

Add "except" option to extends #758

Closed perryqh closed 2 years ago

perryqh commented 2 years ago

Our team has the need to extend a rabl template except for some fields.

extends 'foo', except: [:bar, :baz]

except is a new option, which will exclude the specified fields from the extended template.

nesquena commented 2 years ago

Thanks @perryqh, nice addition!

perryqh commented 2 years ago

Thanks @nesquena! When are you planning on publishing a new gem version?

nesquena commented 2 years ago

Thank you! I'll push a gem version later this week or this weekend and reply back here

nesquena commented 2 years ago

🚀 https://rubygems.org/gems/rabl/versions/0.16.0 @perryqh I've also added you as a collaborator on the gem. Could you add a small section for the new except command to the README and/or https://github.com/nesquena/rabl/wiki ?