app/models/user.rb
# Note that this can end up being expensive, but avoids errors.  Watch your qeries!
Note that this can end up being expensive, but avoids errors.  Watch your qeries!
Note that this can end up being expensive but avoids errors . Watch your qeries!
def reload_all_values_if_missing(which)
    which = [which] unless which.is_a?(Array)
    reload_needed = false
    which.each do |attr|
      reload_needed = true unless self.has_attribute?(attr.to_sym)
    end
    self.reload if reload_needed
  end
def reload_all_values_if_missing ( which ) which = [ which ] unless which . is_a? ( Array ) reload_needed = false which . each do | attr | reload_needed = true unless self . has_attribute? ( attr . to_sym ) end self . reload if reload_needed end
Note that this can end up being expensive, but avoids errors.
Note that this can end up being expensive but avoids errors .
which
<not_specific>