app/controllers/settings_controller.rb
##
# yield up an error message if no user is found.
yield up an error message if no user is found.
yield up an error message if no user is found .
def ensure_user_exists(username)
    return unless @user.nil?
    render json: { message: I18n.t('courses.error.user_exists', username: username) },
           status: :not_found
    yield
  end
def ensure_user_exists ( username ) return unless @user . nil? render json : { message : I18n . t ( 'courses.error.user_exists' , username : username ) } , status : :not_found yield end
yield up an error message if no user is found.
yield up an error message if no user is found .
username
<not_specific>