app/models/user.rb
# checks whether the profile should be updated

checks whether the profile should be updated
checks whether the profile should be updated
def update_profile?
    REQUIRED_FIELDS.each { |field|
      value = self.send field
      return true if value.nil? || value.empty?
    }
    false
  end
def update_profile? REQUIRED_FIELDS . each { | field | value = self . send field return true if value . nil? || value . empty? } false end
checks whether the profile should be updated
checks whether the profile should be updated