Sha256: 13e919449abc0f22bc06eaf2b9b1c250164c448ed54108125a7808b5cfc4d4e6

Contents?: true

Size: 447 Bytes

Versions: 4

Compression:

Stored size: 447 Bytes

Contents

# frozen_string_literal: true

module Decidim
  module Proposals
    # A proposal can include a notes created by admins.
    class ProposalNote < ApplicationRecord
      belongs_to :proposal, foreign_key: "decidim_proposal_id", class_name: "Decidim::Proposals::Proposal", counter_cache: true
      belongs_to :author, foreign_key: "decidim_author_id", class_name: "Decidim::User"

      default_scope { order(created_at: :asc) }
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
decidim-proposals-0.9.3 app/models/decidim/proposals/proposal_note.rb
decidim-proposals-0.9.2 app/models/decidim/proposals/proposal_note.rb
decidim-proposals-0.9.1 app/models/decidim/proposals/proposal_note.rb
decidim-proposals-0.9.0 app/models/decidim/proposals/proposal_note.rb