Permalink
Find file
bb6fd70 Jun 27, 2014
@harlow @homakov @edwardloveall
13 lines (11 sloc) 319 Bytes
class Friend < ActiveRecord::Base
validates :name, presence: true
validates :avatar,
attachment_content_type: { content_type: /\Aimage\/.*\Z/ },
attachment_size: { less_than: 5.megabytes }
has_attached_file :avatar, styles: {
thumb: '100x100>',
square: '200x200#',
medium: '300x300>'
}
end