Skip to content

Instantly share code, notes, and snippets.

@pezra
Forked from paul/databases.rb
Created July 3, 2010 04:02
Show Gist options
  • Save pezra/462299 to your computer and use it in GitHub Desktop.
Save pezra/462299 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)]
render(:json, './app/views/database.json.jrb') do
@template.collection(@databases)
end
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment