search for: long_book

Displaying 1 result from an estimated 1 matches for "long_book".

Did you mean: long_books
2009 Jul 31
8
Would like include model association in to_xml
i have: class Library << ActiveRecord::Base has_many :books end class Book << ActiveRecord::Base belongs_to :library end in my controller i have: render :xml=> Library.find(:all).to_xml(:include=>books) but, i would like put a condition in the books ( e.: pages >= 100 ) i would like to create a xml with all Libraries, but books with pages more than 100) How to