Skip to content

Instantly share code, notes, and snippets.

@wycats
Created September 16, 2008 10:45
Show Gist options
  • Save wycats/11015 to your computer and use it in GitHub Desktop.
Save wycats/11015 to your computer and use it in GitHub Desktop.
$KCODE = 'UTF8'
require "merb-assets"
Merb.flat! do |url|
url.match('/').to(:controller => 'simple', :action =>'index')
end
class Simple < Merb::Controller
provides :json
self._template_root = Dir.pwd
def index
render :index
end
def list
display(:array => %w(One Two Three Four))
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment