Dump of some setup but no feature adds

This commit is contained in:
Andrew Tomaka 2013-08-12 03:31:42 -04:00
parent 6e2414eb2e
commit 3978fec3d6
6 changed files with 53 additions and 1 deletions

7
app/models/lift.rb Normal file
View file

@ -0,0 +1,7 @@
class Lift < ActiveRecord::Base
belongs_to :workout
LIFTS = [:sqaut, :benchpress, :bentoverrow, :overheadpress,
:straightlegdeadlift, :uprightrow, :calfraise ]
validates_inclusion_of :lift, :in => Lift::LIFTS
end

View file

@ -1,4 +1,6 @@
class Workout < ActiveRecord::Base
has_many :lifts, dependent: :destroy
DAY_TYPES = [:heavy, :medium, :light ]
validates_date :date
validates_inclusion_of :day_type, :in => Workout::DAY_TYPES