-
Use Sinatra to build the app
- ➡️ This app is built with Sinatra framework.
-
Use ActiveRecord for storing information in a database
- ➡️ This app uses ActiveRecord to map classes to relational database tables, class associations are defined in app/models.
-
Include more than one model class (list of model class names e.g. User, Post, Category)
- ➡️ This app contains three classes:
User, Course, UserCourse
.
- ➡️ This app contains three classes:
-
Include at least one has_many relationship
- ➡️ User has_many
courses
anduserCourses
.
- ➡️ User has_many
-
Include user accounts
- ➡️ A user can create her account, either as a student or as an instructor.
-
Ensure that users can't modify content created by other users
- ➡️ A user who is an
instructor
can edit the courses she is teaching and student enrollment status.
A user who is a
student
can edit the courses she is registered for.All users can edit their personal account information!
- ➡️ A user who is an
-
Include user input validations
- ➡️ User input validates are both defined in their model definitions, and validated in forms where certain inputs are required.
For example, the
Course
model validates:instructor_id, :name, :description, :level
. These attributes also validated in thecourses/new
form, wherecourse name, description, level
are required inputs. -
Display validation failures to user with error message
- ➡️ Validation messages are displayed using
rack-flash3
Ruby Gem.
For example, when a new user sign-up for an account, an error message will be displayed if they do not complete all required fields accurately:
Please ensure you have filled in all required fields correctly!
- ➡️ Validation messages are displayed using
-
Your README.md includes a short description, install instructions, a contributors guide and a link to the license for your code
- ➡️ This app's
README file
includes all required descriptions.
- ➡️ This app's
-
You have a large number of small Git commits
- ➡️ This repo currently has 75 commits
-
Your commit messages are meaningful
- ➡️ All commit messages are descriptive of the changes made, and the corresponding files changes are made in./
-
You made the changes in a commit that relate to the commit message
- ➡️ Changes made in each commit correspomds to the commit message
-
You don't include changes in a commit that aren't related to the commit message
- ➡️ Yes
- [] Navigation system
- Navbar -> If ! logged_in show signup and login -> I logged in show links to /courses and /courses/new and logout
- Notifications -> Make sure the notification states the right thing.