Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

Ruby Ruby on Rails 5 Basics Handling Requests Handling Requests

Muhammad sharifi
Muhammad sharifi
4,455 Points

anyone can help

The controller receives the request, loads the requested data via the ............, and then inserts that data into the .................... in order to render a response.

3 Answers

Jennifer Nordell
seal-mask
STAFF
.a{fill-rule:evenodd;}techdegree
Jennifer Nordell
Treehouse Teacher

Hi, Muhammad sharifi! The request is sent to the controller which then pulls in the data from the model and sends that data off to the view for displaying :smiley:

Your controller is a bit like a guy directing traffic back and forth between the model (which holds the data) and the view (which displays the data). The controller is the middle man here. On either side of the controller is the model and the view.

Hope this helps! :sparkles:

Muhammad sharifi
Muhammad sharifi
4,455 Points

Thanks, Jennifer Nordell for the reply it's the best answer I have found it right after submitting a help

Adriana Cabrera
Adriana Cabrera
14,618 Points

The controller receives the request, loads the requested data via the MODEL, and then inserts that data into the VIEW in order to render a response.

Just it is easier to remember with mnemonics MVC (Model View Controller)