search for: workout_d

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

Did you mean: workout_id
2008 Feb 25
4
Using group in with find in an ActiveRecord appropriately
I''m playing around with the Practical Rails Projects code, and was attempting to make a change for graphing data differently using groupings. Basically the code went from: total_weight = @exercise.activities.collect {|e| e.repetitions * e.resistance} workout_dates = @exercise.activities.collect {|e| e.workout.date.to_s} To: total_weight = @exercise.activities.find( :all, :select => "sum( repetitions * resistance ) AS resistance",...