Wie diese einfache Abfrage übersetzen auf Schienen ruby ActiveRails Active Zusammenfassung Anweisung
select sum(current*progress) from features;
ich versucht habe
@feature = Feature.where(project_detail_id: @project_detail.id)
@current_progress = @feature.current * @feature.progress
@total_current_progress = @feature.sum(@current_progress)
aber nichts funktioniert bekomme ich nicht @total_current_progress
Ergebnis
danke im voraus
dank viel Kamerad, dieses funktioniert gut – Alex