Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

15 lines (12 sloc) 0.413 kB
class VersionHistory < ActiveRecord::Base
attr_accessible :count, :day, :version_id
belongs_to :version
def self.for(version, day)
VersionHistory.where(:version_id => version.id, :day => day).first
end
def self.make(version, day, count)
VersionHistory.create(:version_id => version.id,
:day => day.to_s,
:count => count.to_i).save
end
end
Jump to Line
Something went wrong with that request. Please try again.