respond_to do |format|
      if @activity.save
        format.json { render :json => @activity, :status => :created }
      else
        format.json { render :json => @activity.errors, :status => :unprocessable_entity }