I have:
@layout = [:maincol => ['a'], :sidecol => []]
then I want to loop and get:
<div class="maincol"><div class="a"></a></div>
<div class="sidecol"></div>
How do I do it?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
First of all, this is a ruby question not ruby-on-rails. Secondly there are a few naming conventions in Rails and
@layoutwould certainly confuse other programmers as well as:maincoland:sidecolis a rather bad naming and they should be what ever the model behind is.