Displaying 1 result from an estimated 1 matches for "arr_journeys".
2007 Jul 18
1
How to pass an array of model objects on a view
hello,
I am just beginning to understand how ruby on rails works. I have the
following problem:
In the controller I would like to create an array of model objects:
@arr_journeys = Array.new(3, Journey.new)
In the view I would like to do the following:
<% for i in 1..4 %>
<%= text_field(@arr_journeys[i], :quantity, :size => 6 %)>
<% end>
Is there any chance to do it like this? Do I have to write my own
helpers?
Greets & thanks
Sven
--~...