search for: workout_id

Displaying 2 results from an estimated 2 matches for "workout_id".

2008 Feb 25
4
Using group in with find in an ActiveRecord appropriately
...To: total_weight = @exercise.activities.find( :all, :select => "sum( repetitions * resistance ) AS resistance", :group => "workout_id", :order => "workout_id" ).collect{ |e| e.resistance } workout_dates = @exercise.activities.find( :all, :group =>...
2006 Apr 19
1
AJAX - update item forms problem
...id => "workout_form_#{workout.id.to_s}" } %> <% @workout = workout %> <%= render :partial => ''update_form'' %> <%= end_form_tag %> </td> </tr> workouts_controller.rb ---------------------- def show_workout_update_form @workout_id = params[:id] end def hide_workout_update_form @workout_id = params[:id] end def update @workout = Workout.find(params[:id]) @workout.exercises_count = @workout.exercises.count @saved = @workout.update_attributes(params[:workout]) return if request.xhr? # render RJS...