arena_app/app/models/team.rb
def avatar_size
        if avatar.size > 3.megabytes
          errors.add(:avatar, "should be less than 3MB")
        end
      end
# Validates the size of an uploaded picture.
Validates the size of an uploaded picture.
Validates the size of an uploaded picture .
def avatar_size
        if avatar.size > 3.megabytes
          errors.add(:avatar, "should be less than 3MB")
        end
      end
def avatar_size if avatar . size > 3 . megabytes errors . add ( :avatar , "should be less than 3MB" ) end end
Validates the size of an uploaded picture.
Validates the size of an uploaded picture .