lortza / lortza/therapy_tracker
convert burn rep to 2 dropdowns
Open
@lortza is already working on this.
Since May 10, 2019.
pair
- Dominant language
- Ruby
- Stars
- 9
- Forks
- 3
- Avg merge
- 24m
- Merged PRs (30d)
- 11
Description
i'd like to convert the 2.3 style of rep counting to 2 different fields to make the feature easier to use.
- add
burn_setfield toexercise_logstable - validate
burn_setonly on update - loop over each exercise log record and parse the existing data:
ExerciseLog.all.each do |log|
if log.burn_set == nil
if log.burn_rep == nil
log.burn_set = 0
log.burn_rep = 0
else
nums = log.burn_rep.to_s.split('.')
log.burn_set = nums.first.to_i
log.burn_rep = nums.last.to_i
log.burn_rep = 10 if nums.last.to_i == 1
end
log.save
end
end
- add dropdowns to the
exercise_logs/form - add new burn set & rep info to views & partials
- use JS to limit the set & rep dropdown options to the values that are in the log's form fields (on edit only)
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.