Sha256: a496f2f628246c22179daaa423f96ac67358e897a88a1350bc84087be839608e
Contents?: true
Size: 543 Bytes
Versions: 17
Compression:
Stored size: 543 Bytes
Contents
module Spina class Photo < ActiveRecord::Base mount_uploader :file, PhotoUploader has_many :page_parts, as: :page_partable has_many :structure_parts, as: :structure_partable has_many :photo_collections_photos has_many :photo_collections, through: :photo_collections_photos scope :sorted, -> { order('created_at DESC') } scope :sorted_by_photo_collection, -> { order('position') } validates_presence_of :file def name file.file.filename end def content self end end end
Version data entries
17 entries across 17 versions & 1 rubygems