[Rails] Re: Rails show views from a different controller

2010-11-06 Thread Dv Dasari
Arailsdemo A. wrote in post #959802: > You need to take the redirect_to out of the about_us action, and instead > just set an instance variable that has the comments that you want to > display. > That is Awesome, just works like I wanted. Thank you so much. -- Posted via http://www.ruby-forum.co

[Rails] Rails show views from a different controller

2010-11-06 Thread Dv Dasari
In my Ruby on Rails application I have a page Aboutus - This has a Controller and View. Has no model. I have a Comments model (generated by the rails generate scaffold comment) - This has a Controller, view, model On my Aboutus page, I want to show the "Comments" from the comments model, so I am

[Rails] Re: Display an array into multiple columns in a view

2010-11-06 Thread Dv Dasari
Walter Davis wrote in post #959491: > Have a look at the Enumerable class: > http://ruby-doc.org/core/classes/Enumerable.html > each_slice in particular looks likely what you need. > > Walter Thanks that worked -- Posted via http://www.ruby-forum.com/. -- You received this message because y

[Rails] Display an array into multiple columns in a view

2010-11-04 Thread Dv Dasari
I have an array "$a" and the below code in my view displays all the elements in a single column. How do I display them into 5 columns? I am not sure if it should be done thru ruby code, or html tags or CSS. Please suggest. thanks <% for w in $a %> <%= w %> <% end %> -- Posted via http://ww