Skip to content

Conversation

@frankienakama
Copy link

Task List

Congratulations! You're submitting your assignment!

Comprehension Questions

Question Answer
Describe in your own words what the Model is doing in Rails Models are essentially Ruby classes, and Task does all the communicating and hard work between the views and the db
Describe in your own words what the Controller is doing in Rails Stores the methods
Describe in your own words what the View is doing in Rails Creates what the user sees in their browser
What is the purpose of using strong params? (i.e. the params method in the controller) It restricts the changes a user can make.
How are Rails migrations related to Rails models? Migrations contain the tables to be used by Models to store and structure data.
Describe one area of Rails that are still unclear on All of it? I had a really hard time with Rails (as you can tell by its incompleteness and late turn-in) and I think I am going to need some extra help catching up this week.

@Hamled
Copy link

Hamled commented Oct 5, 2017

Task List

What We're Looking For

Feature Feedback
Baseline
Appropriate Git Usage with no extraneous files checked in
Answered comprehension questions ✅ Q2: Controllers have methods that are known as controller actions, these are the methods that get run when a specific route is requested by the browser. They are also the part of the code that coordinates between the model and the view.
Q5: More specifically, migrations are instructions for Rails to add/remove/modify those tables in the database.
Successfully handles: Index, Show
Successfully handles: New, Create
Successfully handles: Edit, Update
Successfully handles: Destroy, Task Complete Half. We have the destroy action but not marking tasks complete.
Routes follow RESTful conventions
Uses named routes (like _path)
Overall Overall this is good. I'm not sure why we have both a Tasks index page and an "All Tasks" page, which mostly seem to have the same content.

You mentioned in your comprehension answers that you are feeling unsure about Rails and were unable to complete the mark completed requirement. With the additional half-week of Rails experience do you feel more comfortable with the work involved in implementing that feature?

@task = Task.find(params[:id])
end

def all
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This action seems to be doing the same thing as the index action. Is there a reason to have this one as well?

def create
task = Task.new(task: params[:task][:task], description: params[:task][:description], due: params[:task][:due], status: false)
task.save
redirect_to('/tasks')
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ideally here we would use redirect_to tasks_path instead. It should work the same way as this line does, but is more flexible if we for some reason need to change the URL that maps to the Tasks#index action.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants