Ruby_template_handler is a project mainly written in Ruby, based on the View license.
Produce JSON views using pure-ruby
A Rails view template handler that renders Ruby objects to JSON.
Inspiration was taken from http://github.com/mschuerig/ruby_template_handler.