Am 06.10.2010 um 16:23 schrieb Michael Schuerig:
>
> @netwerks_by_category = Netzwerk.
> includes(:user). # lade User gleich mit
> group_by(&:netzwerk_kath_id). # gruppiere Ergebnisse nach Kategorie
> sort_by { |kath, _| kath } # sortiere Kategorien
>
@netzwerks_by_category =
Netzwerk.includes(:user).group_by(&:netzwerk_kat_id).sort_by { |type, _| type }
=> undefined method `includes' for #<Class:0x102cd3c48>
evt. erst ab Rails3 ? Bin noch bei 2.9
---
ist das so korrekt? (&:netzwerk_kath_id).sort_by { |type, _| type }
mit & und Unterstrich? Wenn ja, was bewirkt das?
Danke für die Infos..
Werner Laude
http://www.webagentur-laude.de
_______________________________________________
rubyonrails-ug mailing list
[email protected]
http://mailman.headflash.com/listinfo/rubyonrails-ug