-
Notifications
You must be signed in to change notification settings - Fork 124
Home
If you have have a general question that is not specific to the Module 1 content, it may have already been answered here.
- rq03.1 - implement create user method
- rq03.2 - assignment code has create_todolist method
- What $1 stands for?
- How to delete table and generate model again?
A: Yes. Please refer to the grading policy here.
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")
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
.
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
.
A: You can rollback your migration and delete model - this is the simple way. Find instructions on Rails Guide §4.1 Rolling Back migrations.