Displaying 1 result from an estimated 1 matches for "hide_workout_update_form".
2006 Apr 19
1
AJAX - update item forms problem
...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 instead
update.rjs
----------
if @saved
page.hide...