Skip to content

Instantly share code, notes, and snippets.

@pezra
Forked from paul/databases.rb
Created July 3, 2010 04:01
Show Gist options
  • Save pezra/462298 to your computer and use it in GitHub Desktop.
Save pezra/462298 to your computer and use it in GitHub Desktop.
require 'ostruct'
class Keister::App
class DatabasesResource
include Spinal::Resource
resource '/databases'
def get
@databases = [OpenStruct.new(:created_at => Time.now.utc, :updated_at => Time.now.utc)]
respond_with(:json) do
render :something
end
respond_with(:html) do
render :something_else
end
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment