On 14.09.2007, at 12:17, Michael Kastner wrote:
Hallo,
geht das nicht?
@articles = @topic.articles :conditions => ['active = ?', true]
Ich erhalte bei dieser Abfrage alle Artikel, aber ich will nur die
bekommen, die mit true gekennzeichnet sind.
Nein, das sollte so nicht funktionieren.
Ein Blick in die Doku hilft normalerweise weiter:
http://api.rubyonrails.com/classes/ActiveRecord/Associations/
ClassMethods.html#M000642
Siehe Eintrag collection.find.
Gruesse, Mathias
--
// Mathias Meyer
// PAPERPLANES SOFTWARE.ENTWICKLUNG
// www.paperplanes.de
// Gabriel-Max-Str. 3, 10245 Berlin
// meyer.at.paperplanes.de, 0163.765.27.47
_______________________________________________
rubyonrails-ug mailing list
[email protected]
http://mailman.headflash.com/mailman/listinfo/rubyonrails-ug