gmfholley / 06-23-wellness_tracker Goto Github PK
View Code? Open in Web Editor NEWCreates a wellness tracker for employees of corporate challenges
Creates a wellness tracker for employees of corporate challenges
I could probably do more. But I have to stop sometime.
I added some helper methods to create html outside my erb files, but I wasn't sure how to make those methods small. And I'm not sure how readable they are. I tried two styles - one big quote in html style, and one with a line for each html tag.
I didn't update to activerecord, but I did update my database_controller file to start handling some of the validation and data-type conversion that was so messy before. I added a post_initialize method that can hook into the initialize method of each class and a validate_field_types method that I run first in each class's valid? method. Then the classes just validate special business logic like dates and integer ranges.
I might try activerecord for my next project.
Person Table | Description |
---|---|
id | Integer PRIMARY KEY |
name | Text |
Exercise Types | Description |
---|---|
id | Integer PRIMARY KEY |
name | Text |
point_base |
Integer |
Intensity | Description |
---|---|
id | Integer PRIMARY KEY |
name | Text |
point_adjustment |
Integer |
Duration | Description |
---|---|
id | Integer PRIMARY KEY |
name | Text |
num_quarter_hours |
Integer |
Exercise Event | Description |
---|---|
id | Integer PRIMARY KEY |
person_id |
Integer FOREIGN KEY NOT NULL |
exercise_type |
Integer FOREIGN KEY NOT NULL |
date | Integer NOT NULL |
intensity | Integer FOREIGN KEY NOT NULL |
duration | Integer FOREIGN KEY NOT NULL |
points | Integer DEFAULT 0 |
Within the Exercise Event table, the combination of user_id
, exercise_type
and date should be unique.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.