Automatic ActiveRecord attribute conversion

9 views
Skip to first unread message

guillaume garcera

unread,
Nov 25, 2009, 1:59:35 PM11/25/09
to musta...@googlegroups.com
Hello,

Just to share some code I write for easily export an AR object to
Mustache
http://gist.github.com/242934

It's very simple actually and maybe other have ever do it.

I plan to add renaming possibility for attribute when they are converted
For exemple
mustache_attrs :name, :max_player, :min_player => {:as => :min}
but doesn't know the best syntax for this feature.

Feel free to use it/contribute to make it better if you want



guillaume garcera
twitter : https://twitter.com/djtal64



Reply all
Reply to author
Forward
0 new messages