Skip to content

Instantly share code, notes, and snippets.

@inem
Created September 1, 2011 14:55
Show Gist options
  • Save inem/1186337 to your computer and use it in GitHub Desktop.
Save inem/1186337 to your computer and use it in GitHub Desktop.
Hi!
I just wanted to say thanks. Thanks a lot!!
I'm working on a project in which I need to serialize some heavy collections including some polymorphic associations.
I don't know if you've thought about that, but with slight modifications Tequila is the best solutions I've found to do just that!
I've added checks when serializing to avoid calling a method/attribute the current object doesn't reply to. Thus, I can have a jazz markup including polymorphic objects (say, "commentable") and include different associations in this commentable, each valid for only a subset of possible commentable objects.
It works like a charm and might be a feature you'd like to include in Tequila for good? (Though now nothing bad happens when I try including an incorrect attribute/association, which could be an issue)
Anyway, my real thanks goes to Tequila's performance! I don't know how you benchmarked it, but as far as I'm concerned it gets me to 300ms (fetching + serializing) against 5300ms using to_json :)
So that's it, thanks again and I hope you'll continue on working on Tequila :)
Olivier
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment