Sha256: 58d9e01945d82544869332b23d77c893ed90c03c80711cfa35693566a0318bed

Contents?: true

Size: 325 Bytes

Versions: 12

Compression:

Stored size: 325 Bytes

Contents

module Formstrap
  module Attachment
    extend ActiveSupport::Concern
    included do
      scope :not_a_variant, -> { where.not(record_type: "ActiveStorage::VariantRecord") }

      def root_record
        record
      end

      def root_record_name
        "#{record.class.name} #{record.id}"
      end
    end
  end
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
formstrap-0.4.5 app/models/concerns/formstrap/attachment.rb
formstrap-0.4.4 app/models/concerns/formstrap/attachment.rb
formstrap-0.4.3 app/models/concerns/formstrap/attachment.rb
formstrap-0.4.2 app/models/concerns/formstrap/attachment.rb
formstrap-0.3.5 app/models/concerns/formstrap/attachment.rb
formstrap-0.3.4 app/models/concerns/formstrap/attachment.rb
formstrap-0.3.3 app/models/concerns/formstrap/attachment.rb
formstrap-0.3.2 app/models/concerns/formstrap/attachment.rb
formstrap-0.3.1 app/models/concerns/formstrap/attachment.rb
formstrap-0.3.0 app/models/concerns/formstrap/attachment.rb
formstrap-0.2.1 app/models/concerns/formstrap/attachment.rb
formstrap-0.2.0 app/models/concerns/formstrap/attachment.rb