Dump of some setup but no feature adds
This commit is contained in:
parent
6e2414eb2e
commit
3978fec3d6
6 changed files with 53 additions and 1 deletions
7
app/models/lift.rb
Normal file
7
app/models/lift.rb
Normal 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
|
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue