Sha256: 0faca7722fe3883ac179b3ee1b68bef67377c9b6038377a5c50932ba40ff9e02
Contents?: true
Size: 406 Bytes
Versions: 5
Compression:
Stored size: 406 Bytes
Contents
require 'mongoid' module SimpleFormAttachments module Attachment extend ActiveSupport::Concern included do field :temporary, type: Boolean, default: false scope :temporary, -> { where(temporary: true) } scope :permanent, -> { where(temporary: false) } end def to_simple_form_partial_path File.join('simple_form_attachments', to_partial_path) end end end
Version data entries
5 entries across 5 versions & 1 rubygems