search for: _list_stripes

Displaying 5 results from an estimated 5 matches for "_list_stripes".

Did you mean: list_stripes
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") : "&nbsp;" %> it always returns the &nbsp. This is cause I think Rails now considers tinyint(1) as a boolean, so to make this works the sentence may be changed to: <%= list_...
2006 Apr 28
1
acts_as_taggable help
...egory.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 %></td> But i get an error "undefined method `tag_names'' for #<Array:0x3673...
2006 Feb 24
1
Help a n00b?
...%></td> </tr> </tfoot> and here''s the relevant code in foods_controller.rb def create_with_ajax @food = Food.new(params[:food]) if @food.save render_partial "list_stripes" end end I''ve got a _list_stripes.rhtml partial that creates the table. The crazy part is that when I try creating a new item I get "Template is missing" -- which I don''t understand at all. If I change the action in form_remote_tag to the default ''create'' method I get back (in the table)...
2006 Apr 25
3
belongs_to and has_many
...name => "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 en...
2006 Jun 08
2
Errata in the "Four Days with Rails"
...t fine at this point. The same problem affects one of the checks in the listing of the items.  The tick mark (indicating done) will not appear because the code expects to be dealing with integers while Rails seems to be thinking that it is working with boolean values. In the file: app\views\items\_list_stripes.html you need to change the test to compare against true as shown below:     &lt;%= list_stripes["done"] == true ? show_image("done_ico.gif") : " " %&gt; The original code that tests the value against 1 is as below (Page 29):     &lt;%= list_stripes[&quo...