$('.profile_editable').on('save', function(e, params) {
var progress_value = params.response.progress_value
$('.progress_title').text("Your profile is " + progress_value + "% completed" )
$('.bar').css('width', progress_value + '%');
});
Then, pass info in json response -->
def update
@common_app = CommonApp.find(params[:id])
if @common_app.update_attributes(common_app_params)
respond_to do |format|
format.html { render :action => "show" }
format.json { render json: {success: true, progress_value: @common_app.user.progress, user_name: @common_app.user.name } }
end
else
render json: {errors: @common_app.errors}, status: 400
end
end