app/controllers/socials_controller.rb
# POST-only action that removes an association to a swimmer for the current user.
POST-only action that removes an association to a swimmer for the current user.
POST - only action that removes an association to a swimmer for the current user .
def dissociate
    if request.post?                                
      if current_user.set_associated_swimmer()
        flash[:info] = I18n.t('user_association.dissociation_successful')
      else
        flash[:error] = I18n.t('user_association.dissociation_unsuccessful')
      end
    end
    redirect_back( fallback_location: root_path ) and return
  end
def dissociate if request . post? if current_user . set_associated_swimmer ( ) flash [ :info ] = I18n . t ( 'user_association.dissociation_successful' ) else flash [ :error ] = I18n . t ( 'user_association.dissociation_unsuccessful' ) end end redirect_back ( fallback_location : root_path ) and return end
POST-only action that removes an association to a swimmer for the current user.
POST - only action that removes an association to a swimmer for the current user .
# === POST: ===