Ruby on Rails Wednesday, November 25, 2015

  [1m [36m (50.3ms) [0m  [1mSELECT COUNT(*) FROM `categories` WHERE (`categories`.`lft` >= 0) AND (`categories`.`lft` < 0) AND (`categories`.`id` != 1) [0m
descendants count = 0

i created the lft field for added functionality but never populated it i dunno where it's supposed to get it's value from or even what it is

<div>
 <table>
 <% logger.info "descendants count = #{@category.descendants.count}" %>
 <% @category.descendants.each do |category| %>
  <% category.listings.each do |listing| %>
   <% logger.info listing.inspect %>
   <tr><td><%= listing.title %>
  <% end %>
 <% end %>
 </table>
</div>

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/4cac0725-1bf3-423c-8108-2cb8343e27ff%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment