Sha256: 1f90b5f57298ea60ca448fbaf267e2c44578c77c8fe00b936a0b7fbe7b653c5d

Contents?: true

Size: 307 Bytes

Versions: 1

Compression:

Stored size: 307 Bytes

Contents

module KnowledgeBase::Concerns::Models::Sectionables::Image
  extend ActiveSupport::Concern

  included do
    mount_uploader :image, KnowledgeBase.config.image_image_uploader

    has_many :sections, as: :sectionable, dependent: :destroy

    def to_s
      "#{super} ##{id}: #{caption}"
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
knowledge_base-0.2.0 lib/knowledge_base/concerns/models/sectionables/image.rb