Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tree: 8216e3bee8
Fetching contributors…

Cannot retrieve contributors at this time

23 lines (16 sloc) 0.577 kb
$:.unshift File.dirname(__FILE__)
require 'resource'
class Link < Resource
INSPIRED = 1
PERSONAL = 2
attr_accessor :id, :type, :name, :url, :description
def self.all
self.fetch("SELECT * from links ORDER BY name")
end
def self.inspired_by
self.fetch("SELECT * from links WHERE type=#{INSPIRED} ORDER BY name")
end
def self.personal
self.fetch("SELECT * from links WHERE type=#{PERSONAL} ORDER BY name")
end
end
Jump to Line
Something went wrong with that request. Please try again.