Pastie now auto-senses if line-wrap is a bad or good idea. Feedback?
Report abuse
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
require 'ramaze' require 'json' class MainController < ::Ramaze::Controller Ramaze::Route[%r{^/foo$}] = '/index' provide :json, :type => 'application/json' do |action, value| value.to_json end def index @items = %w( a b c ) end end Ramaze.start
Pasted May 28, 2009 5:49PM EDT
by Denis Defreyne (ddfreyne)
Embed
paste again
Ads from Ruby Row