Skip to content

Conversation

@skwiens
Copy link

@skwiens skwiens commented Sep 27, 2017

Task List

Congratulations! You're submitting your assignment!

Comprehension Questions

Question Answer
Describe in your own words what the Model is doing in Rails The model is in charge of business logic and decision making. In many of our past projects we have had to run loops, conditionals, etc to determine something. These types of decisions go in to the Model. Since TaskList is not really much about making decisions and is more about writing something and showing that something, but Model looks really light. The
Describe in your own words what the Controller is doing in Rails The Controller is communicating between the views and the models. It should not contain any business logic, but it can retrieve information from the database and works with the CRUD actions.
Describe in your own words what the View is doing in Rails The View is the interface for the user to see. The View determines what information is presented and how it is presented.
What is the purpose of using strong params? (i.e. the params method in the controller) This protects information that users should not be changing. It only allows certain keys to be passed through from input.
How are Rails migrations related to Rails models? Rails migrations are related to models in that the migrations change the schema of the database. The models themselves are how we access the database. We can use models with the same syntax as we did classes in Ruby. So, a migration can change the database structure which changes the attributes we can call on for a model.
Describe one area of Rails that are still unclear on The first area I am still unclear on is how to make multiple controllers and have them talk to one another, or when/how that would even be appropriate. I am also still fuzzy on how params works in general. I understand that params gathers information from forms if they are submitted as well as it can gather information from the url bar in terms of the show method, but I am not sure how everything fits together. I have a feeling both of these will become more clear with time and practice, however, and am not worried.


# (name: params[:task][:name], description: params[:task][:description])

if @task.save
Copy link

Choose a reason for hiding this comment

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

When I make a new task, I encounter an error: completed on @task is nil at this point, and your table requires completed to be not nil.

One thing you can do is set completed on @task before you .save
Another thing you can do is make a migration to make completed accept nil in the tasks table

@tildeee
Copy link

tildeee commented Oct 6, 2017

Task List

What We're Looking For

Feature Feedback
Baseline
Appropriate Git Usage with no extraneous files checked in x
Answered comprehension questions x
Successfully handles: Index, Show x
Successfully handles: New, Create doesn't work for me
Successfully handles: Edit, Update x
Successfully handles: Destroy, Task Complete x
Routes follow RESTful conventions x
Uses named routes (like _path) x
Overall

@tildeee
Copy link

tildeee commented Oct 6, 2017

You and I just talked, but I'm going to figure out why creating a task doesn't work on my machine

Cool work on using partials for the nav :)

Good work otherwise!

I think you know, but your styling isn't as developed as it could be. :)

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