app/models/micropost.rb
def picture_size
      if picture.size > 5.megabytes
        errors.add(:picture, "Debe ser menor que 5MB")
      end
    end
# Validates the size of an uploaded picture.
Validates the size of an uploaded picture.
Validates the size of an uploaded picture .
def picture_size
      if picture.size > 5.megabytes
        errors.add(:picture, "Debe ser menor que 5MB")
      end
    end
def picture_size if picture . size > 5 . megabytes errors . add ( :picture , "Debe ser menor que 5MB" ) end end
Validates the size of an uploaded picture.
Validates the size of an uploaded picture .