Ruby on Rails Thursday, January 17, 2013

Hi, i'm new with ruby and MVC, I have my application with my main view
application that i will find in all pages of my website.
<!DOCTYPE html>
<html>
.......
<body>
<div id="container">
#MENU HERE
<%= yield %>
</div>
</body>
</html>
i wanted to know what is the better way to integrate a menu inside, but
in another view ... like include the html view. Like if it was a module.

it's just a simple menu, like:
<ul class="nav">
<li><a href="#">Link One</a></li>
<li><a href="#">Link Two</a></li>
<li><a href="#">Link Three</a></li>
<li><a href="#">Link Four</a></li>
</ul>

And by the same post, how can I do my routes and call the good
controller for each view (link) ?
If i can do that, and I have to create each controller by the line
command?

Thanks by advance

--
Posted via http://www.ruby-forum.com/.

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

No comments:

Post a Comment