Skip to content
This repository has been archived by the owner on Nov 17, 2018. It is now read-only.
Permalink
master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Go to file
 
 
Cannot retrieve contributors at this time
class Job < ActiveRecord::Base
validates :number_one, :number_two, :numericality => { :only_integer => true }
include Rails.application.routes.url_helpers
def links
list = []
list << {:href => "self", :rel => job_path(self)} if persisted?
list << {:href => jobs_path, :rel => "index"}
list
end
# Queue stuff!
def run
sleep 10
self.answer = number_one + number_two
self.status = "finished"
save!
end
end