Question: ii) In the dashboard controller action, you must create a variable @myCourses that returns an array of all Courses in the database that the user
ii) In the dashboard controller action, you must create a variable @myCourses that returns an array of all Courses in the database that the user is registered on. Given that the current user id can be found in the session variable accessed through session[:user_id], describe a DRY way to do this. (code required for part of this answer) [8] ii) In the dashboard controller action, you must create a variable @myCourses that returns an array of all Courses in the database that the user is registered on. Given that the current user id can be found in the session variable accessed through session[:user_id], describe a DRY way to do this. (code required for part of this answer) [8]
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
