Hello

I have the following situation
This is my controller:

def addcar    @car = Car.new(params[:car])              render :action
=> "list"  endthis is my view: <%(@allcars).each do |cell|%>

<%= link_to cell.to_s, :controller => "car", :action => "addcar", :car
=> cell.to_s %>

<%end %>

In the link_to statement I want to pass cell.to_s to the controller.
how can i do that please? THe cell.to_s is just a string but I want it
to be the name of the car object (car.Name)

In other words I want to pass "Honda" to the controller so that I can
save this to the cars table
Id                                        Name
(Autogenerated)                   Honda
(Autogenerated)                   Mercedes

etc

--

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 [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.


Reply via email to