RubyTemplate gives you a simple means of producing json in your views by letting you write normal ruby.
Scott Fleckenstein
gem "ruby_template", "~> 0.0.2"