Sha256: fcc4a9d390a57f618f171fdc90b192262240e8087e4d1d89be97b923aab52b2d
Contents?: true
Size: 391 Bytes
Versions: 6
Compression:
Stored size: 391 Bytes
Contents
module Gaku class Attachment < ActiveRecord::Base include Trashable belongs_to :attachable, polymorphic: true has_attached_file :asset validates_associated :attachable, message: I18n.t(:'attachment.associated') validates :name, presence: true validates :asset, presence: true, on: :create def to_s name end end end
Version data entries
6 entries across 6 versions & 2 rubygems