Displaying 5 results from an estimated 5 matches for "list_strip".
Did you mean:
list_str
2006 Aug 05
3
Four Days on Rails
I''ve been reading the tutorial and I have problems with the TinyInt(1) for the attribute "item.done". I thought this thread would be the best to post it. I''m using Rails 1.1.14. When in the partial template _list_stripes appears:
<%= list_stripes["done"] == 1 ? show_image("done_ico.gif") : " " %>
it always returns the  . This is cause I think Rails now considers tinyint(1) as a boolean, so to make this works the sentence may be changed to:
<%= lis...
2006 Feb 24
1
Help a n00b?
So I''m trying to do that hot new thing with AJAXy forms:
http://idiet.toasterwaffles.com/foods/list
Here''s the relevant code in list.rhtml (for the form portion)
<tbody>
<%= render_collection_of_partials "list_stripes", @foods %>
</tbody>
<tfoot>
<tr id="addFood"><%= form_remote_tag( :html => {''id'' =>
''createFoodForm''},
:url => {:action =>
''create_with_ajax'...
2006 Apr 25
3
belongs_to and has_many
...ame => "admin", :foreign_key => "id"
end
-------models/admin.rb--------------
class Admin < ActiveRecord::Base
has_many :machines, :foreign_key => ''padmin_id''
has_many :machines, :foreign_key => ''sadmin_id''
end
-------views/_list_stripes.rhtml-----
If it were a straight association machine.admin_id and admin.id, then
this works
<td><%= list_stripes.admin ? list_stripes.admin["admin"] : "UnAssigned"
%></td>
-------------------------------------
I would be happy if I could understand it well...
2006 Apr 28
1
acts_as_taggable help
...-->
@items = Item.find_tagged_with( :any => params[:tag_name])
@categories = Category.find_all
@tag_name = params[:tag_name]
@tagged_items = Item.tags_count(:limit => 100)
end
IN the VIEW
<% @items.each do |item| %>
<%= render :partial => ''list_stripes'', :locals => { :item => item } %>
<% end %>
Where the partial _list_stripes.rthml is a list of items
<td><%=h item.tag_names.join(" ") %></td>
<td><%=h item.created_on %></td>
<td><%=h item.category.name...
2006 Jun 25
4
Zebra Striping a Collection of Partials
I''m using render to display a collection of partials, where each partial
is a table row. Is it possible to zebra-stripe the table using this
method i.e. alternate table rows get a different CSS class? I can''t work
out how each row partial would know whether it was odd or even.
In the normal scheme of things I could do:
<% odd_or_even = 0
for asset in @assets