Sha256: 62d3f84783283d5420aef0c9418fd4a34a4ff5f81711cd2015397fdc58f2678d

Contents?: true

Size: 258 Bytes

Versions: 4

Compression:

Stored size: 258 Bytes

Contents

# frozen_string_literal: true

class Avatar < Asset
  sunrise_uploader AvatarUploader

  validates :data_content_type, inclusion: { in: Sunrise::Utils::IMAGE_TYPES }
  validates_integrity_of :data
  validates_filesize_of :data, maximum: 1.megabytes.to_i
end

Version data entries

4 entries across 2 versions & 1 rubygems

Version Path
sunrise-cms-1.1.1 lib/generators/sunrise/templates/models/active_record/avatar.rb
sunrise-cms-1.1.1 lib/generators/sunrise/templates/models/mongoid/avatar.rb
sunrise-cms-1.1.0 lib/generators/sunrise/templates/models/active_record/avatar.rb
sunrise-cms-1.1.0 lib/generators/sunrise/templates/models/mongoid/avatar.rb