lundi 23 novembre 2015

The method to redirect from one page to other on ruby on rails

In my code, I use something like:

<li><%= link_to "Find a meal", {:controller =>'microposts', :action => 'index'} %></li> 

to redirect to another page.

When I studied the mailbox part, I mentioned the code is:

<li><%= link_to "Inbox", mailbox_inbox_path %></li>

And this kind of notations appear in other places of this tutorial as well. I thought mailbox_inbox_path is a variable already defined somewhere. But I can't find it.

This is the tutorial of inbox messaging.

Aucun commentaire:

Enregistrer un commentaire