Sha256: 8c054d267743ae3091a1aad13b66220deb9f2a4620548f09a2f6ea7c1ea86257
Contents?: true
Size: 638 Bytes
Versions: 1
Compression:
Stored size: 638 Bytes
Contents
module Quadro class Asset::Image < Asset # attributes store :settings, accessors: [:width, :height, :alt] # attr_accessible :width, :height, :alt has_attached_file :attachment, styles: { thumb: '200x200#', small: '320x240>', medium: '640x480>', large: '800x600>' }, default_url: 'quadro/missing/image/:style.png', use_timestamp: false # validations validates :alt, length: { maximum: 60 } validates_attachment :attachment, content_type: { content_type: ['image/jpg', 'image/jpeg', 'image/png', 'image/gif'] } # methods class << self def short_name 'image' end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
quadro-0.6.1 | app/models/quadro/asset/image.rb |