Tasky -Ruby on Rails App Part 1

Sandie Nuñez
3 min readApr 26, 2021

--

Idea for App

Tasky allows users to create, edit and delete customized daily tasks, daily routines and daily journals. Tasky’s mission is to serve as a task management system for adults and children with ADD and ADHD (Attention-deficit/hyperactivity disorder) that struggle with managing their time and responsibilities. Tasky helps you thrive everyday of your life! The goal of this app is to provide an easy and user friendly experience paired with a sleek User Interface design that exceptionally helps people organize their priorities and find a calm balance in their daily lives.

This is the first ever online ADD Task Management system that not only helps you prioritize your tasks and task deadlines but helps you track your ADD symptoms, medications, supplements and more. The Daily Journal feature helps you plan your spiritual, psychological, biological and social long-term goals. The user also has the ability to seamlessly create custom Daily Routines that gives you a visual flow and timeline of what you need to accomplish each day.

Let tasky take your day to infinity and beyond!

Planning Stages

As someone with ADD who has struggled with finding balance with my time and tasks to accomplish each day, I wanted to create a web app that could quickly help me strategize and map out my responsibilities for each day as well as help me maximize my focus, productivity and efficiency.

When planning how I would carry out each feature that I wanted tasky to include and deliver for my users, I started with brainstorming my relationships, attributes, creating my models and migrating my tables in my notebook. I then used this this online mapping tool to visualize each table and model relationship. For this Rails project and assessment, we were asked to include:

  • At least one has_many relationship (x has_many y; e.g. User has_many Recipes)
  • At least one belongs_to relationship (x belongs_to y; e.g. Post belongs_to User)
  • At least two has_many through relationships (x has_many y through z; e.g. Recipe has_many Items through Ingredients)
  • At least one many-to-many relationship (x has_many y through z, y has_many x through z; e.g. Recipe has_many Items through Ingredients, Item has_many Recipes through Ingredients)
  • The “through” part of the has_many through includes at least one user submittable attribute, that is to say, some attribute other than its foreign keys that can be submitted by the app’s user (attribute_name e.g. ingredients.quantity)

Joint Table & Has_many through Association

Understanding the many to many relationships requirement was one of the more challenging aspects of the entire project for me because I could not figure out how to best implement my joint table for the has_many through association. A joint table or joint model is a special table indirectly made by the through part of a has_many through association in the database. It helps join together a many to many relationship between two models and contains the two foreign keys from those two models. In the example below, the Comment model is my joint table and the two foreign keys included in this table are the user_id and task_id. My Comment model also includes at least one user submittable attribute, the message attribute, in addition the foreign keys that the user can submit such as: comments.message

class User < ApplicationRecord
has_many :comments
has_many :commented_tasks, through: :comments, source: :tasks
end

class Comment < ApplicationRecord
belongs_to :user, optional: true
belongs_to :task, optional: true
end

class Task < ApplicationRecord
has_many :comments, dependent: :destroy
has_many :users, through: :comments
end

My initial confusion with my tables and not being sure which attributes would best fit my project, led me to dedicate a lot of my valuable project time that I could have used elsewhere to creating new columns and new tables, renaming tables, changing datatypes, renaming columns and deleting columns.

--

--

Sandie Nuñez
Sandie Nuñez

Written by Sandie Nuñez

0 Followers

Software Engineer

No responses yet