Deployed on Heroku - https://todolistsga.herokuapp.com/
This is a ToDo app which lets you save your todo list one by one. You can add, edit and delete your list and you can also categorize them and there is a separate section for todolists with the status "done" for your convenience. There is a login and registration option, so each user has his/her own privacy. And whenever you are done with todo item, you can change the status and/or delete it permanently.
- Fork it to your github account!
- Clone it to your local machine!
- Inside the project directory on the terminal, type
rails db:create db:migrate db:seed
- if it doesn't work try separately i.e.,rails db:create
in order. - Type
rails s
to start the server and go tohttp://localhost:3000/
- Build Frontend in React
- Get Amazon API to show related products
- Clickable 'To Do' and 'Done' on Index Todolists Directly
- name
- username
- password
- References to user
- title
- description
- References to category
- status
- has_many :todo_lists
- belongs_to :user
- Index - for testing
- Show by ID
- Create and new method
- Destroy method
- Update method
- Index
- Show by id
- Create and new method
- Update method
- Destroy method
- Index
- Show by ID
- Index
- Look Below
- Index view
- Show by ID
- Edit
- New
- Form
- Index view
- Show by ID
- Edit
- New
- Form
- Index view
- Show by ID
- Index view
- Users
- Todolists
- Rendering the status_form on the Todolists Index and passing the todolist's ID.
-
/users/new - Create new user
-
/users/2 - Specific User by ID
-
/users/2/edit - Edit User Information
-
/users/2/todoLists - Specific User ALL Todolists
-
/users/2/todoLists/2 - Specific User Specific Todo list
-
/users/2/todoLists/2/edit- Edit Specific User Specific Todo list
-
/users/2/todoLists/new - New Specific User Specific Todo list
-
/users/2/categories - Specific User All Categories
-
/user/2/categories/2 - Specific User Specific Category
-
/users/2/categories/2/edit - Edit Specific User Specific Category
-
/users/2/categories/new - New Specific User Specific Category
-
/users/2/dones - All todolists with status "Done"
Feature | Priority | Estimated Time | Time Invetsted | Actual Time |
---|---|---|---|---|
Project Planning | H | 1 day | 8 hrs | |
Rails - Backend | H | 2 days | 3.7 days | |
CSS | H | 2 day | 2.7 days |
Categories Controller - Index
@todolists = Todolist.where(user_id: current_user.id).all.group_by(&:category)
@todolists_count = Todolist.where(user_id: current_user.id).all.group(:category).count
Categories Controller - Show
@category = Todolist.where(category: params[:id],user_id: current_user.id)
gem 'devise'
User Authentication and Authorization
ERROR: PG::UndefinedTable: ERROR: relation "categories" does not exist
RESOLUTION: Deleted the foreign_key: true
from t.references
values
ERROR: PG::UndefinedColumn: ERROR: column "user" does not exist
RESOLUTION: Deleted the add_index
to user
ERROR: undefined method update for nil:NilClass
RESOLUTION: Added parent ID inside the set_todolist
i.e., @user = User.find(params[:user_id])
ERROR: Not able to show all categories by current user
RESOLUTION: Todolist.where(category: params[:id],user_id: current_user.id)
ERROR: Not able to show the categorized todolists by current user
RESOLUTION: Todolist.where(user_id: current_user.id).all.group(:category).count
ERROR: Not able to show only current user data
RESOLUTION: @todolists = Todolist.where(user_id: current_user.id)