ruby json template for server side construction of client side data driven elements