Sha256: d323645da0e5e4a08d46abfc02c04b8ea733c1bae5491fdb1ced6317e2258a76

Contents?: true

Size: 535 Bytes

Versions: 8

Compression:

Stored size: 535 Bytes

Contents

# frozen_string_literal: true

module Decidim
  module DecidimAwesome
    class EditorImage < ApplicationRecord
      include Decidim::HasUploadValidations

      self.table_name = "decidim_awesome_editor_images"

      belongs_to :author, foreign_key: :decidim_author_id, class_name: "Decidim::User"
      belongs_to :organization, foreign_key: :decidim_organization_id, class_name: "Decidim::Organization"

      has_one_attached :file
      validates_upload :file, uploader: Decidim::DecidimAwesome::ImageUploader
    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
decidim-decidim_awesome-0.10.3 app/models/decidim/decidim_awesome/editor_image.rb
decidim-decidim_awesome-0.11.2 app/models/decidim/decidim_awesome/editor_image.rb
decidim-decidim_awesome-0.11.1 app/models/decidim/decidim_awesome/editor_image.rb
decidim-decidim_awesome-0.10.2 app/models/decidim/decidim_awesome/editor_image.rb
decidim-decidim_awesome-0.10.1 app/models/decidim/decidim_awesome/editor_image.rb
decidim-decidim_awesome-0.10.0 app/models/decidim/decidim_awesome/editor_image.rb
decidim-decidim_awesome-0.9.3 app/models/decidim/decidim_awesome/editor_image.rb
decidim-decidim_awesome-0.9.1 app/models/decidim/decidim_awesome/editor_image.rb