Skip to content
Kalman Hazins edited this page Mar 31, 2017 · 10 revisions

FAQs - Course 2: Module 1

If you have have a general question that is not specific to the Module 1 content, it may have already been answered here.

Assignments

Requirements

Assignments


Q: Can I turn the assignment in late?

A: Yes. Please refer to the grading policy here.

Requirements


Q: rq03.1 is failing?

A: Make sure your create_user method accepts a hash of params. Its method signature should look like this:

def create_user(params)

The method is called like this:

assignment.create_user(username: "joesmith", password_digest: "xxxx")

Q: rq03.2 is failing?

A: You can't pass params to TodoList.create as is. The keys of params are name and due_date. You need to use these to set the list_name and list_due_date of the TodoList.

Q: What does $1 stand for?

A: $1, $2, etc. refer to parenthesized captures within a regex: given /a(.)b(.)c/, $1 will be the character between a and b and $2 the character between b and c. $` and $' mean the strings before and after the string that matched the entire regex (which is itself in $&), respectively. stackoverflow.

Q: How to delete table and generate model again?

A: You can rollback your migration and delete model - this is the simple way. Find instructions on Rails Guide §4.1 Rolling Back migrations.

Clone this wiki locally