Author Archives: Jeroen van Doorn

ActiveRecord find and MySql ‘IN’ gotcha

In my latest project I needed to fetch a group of tasks who where linked to a  group of categories. All that I have are the Id’s of te categories which made me write the following code Tasks.find(:all, :conditions => ["categorie_id IN (?)", @categories.join(',')]) It seemed to work, but apparently I didn’t test [...]
Posted in Coding, Ruby on Rails | Tagged , , | 2 Comments
  •  

    September 2010
    M T W T F S S
    « Jul    
     12345
    6789101112
    13141516171819
    20212223242526
    27282930