Skip to content

Instantly share code, notes, and snippets.

@chrisconley
chrisconley / index.html
Last active January 26, 2016 20:18 — forked from darwin/index.html
Welcome to comix!
<!DOCTYPE html>
<meta charset="utf-8">
<link rel="stylesheet" href="http://cmx.io/v/0.1/cmx.css"/>
<script src="http://cmx.io/v/0.1/cmx.js"></script>
<body>
<scene id="scene1" height="280">
<label t="translate(0,275)">
<tspan x="0" y="0em">On Mars</tspan>
</label>
<actor t="translate(131,15 )" pose="-11,9|-4,125|-11,99|-11,89|-11,79|-11,59|-16,34|-21,9|-6,34|-1,9|-27,89|-35,71|17,102|32,124">
observes :aws_turk_assignment_request, :after => :approveAssignment, :invokes => :approve_aws_assignment
def self.approve_aws_assignment(request)
AwsTurkAssignmentRequest.delay.get_assignments_for_hit(hit)
end
class Domain < ActiveRecord::Base
named_scope :length, lambda {|length| {:conditions => ["length = ?", length]} if !length.blank? || length == 'all'}
named_scope :viewable, lambda {{:conditions => ["viewable_at < ?", Time.now.utc]}}
named_scope :public, lambda {|public| {:conditions => ["public = ?", true]} if !public.blank?}
end
def self.search(options = {})
self.length(options[:length]).viewable.public(options[:public])
end