Hallo,
Ich habe eine Tabelle und möchte die erweitern wenn ich einen neuen User
eintrage. Mit Divs habe ich das schon ein paar mal gemacht und da geht das
super, gibt es bei Tabellen auch einen Railsway?
Controller/rjs
render :update do |page|
page.insert_html :bottom, :users, :partial => 'user', :object => @user
end
View:
<table id="my_table" cellspacing="1">
<tr class="toprow">
<th>Name</th>
<th>Action</th>
</tr>
<tr>
<td><%= text_field_tag :name %></td>
<td><%= submit_tag "Add" %></td>
</tr>
<div id="users">
<%= render :partial => "user", :collection => @users %>
</div>
</table>
View: _user.rhtml
<tr>
<td><%= user.firstname %></td>
<td>Aktionslinks</td>
</tr>
So ein Div in der Tabelle ist nicht HTML-Konform und geht auch nicht, habe
Ihr vielleicht eine Idee, oder muss ich die Tabelle mit Divs abbilden?
Vielen Dank und herzliche Grüße,
Michael
_______________________________________________
rubyonrails-ug mailing list
[email protected]
http://mailman.headflash.com/mailman/listinfo/rubyonrails-ug