Sha256: 893db0515404b21cfa4fad8a7735b1cff5d978869ba7a1f4f2928e200c33b3ed

Contents?: true

Size: 700 Bytes

Versions: 46

Compression:

Stored size: 700 Bytes

Contents

# frozen_string_literal: true

module Decidim
  module Proposals
    # A valuation assignment links a proposal and a Valuator user role.
    # Valuators will be users in charge of defining the monetary cost of a
    # proposal.
    class ValuationAssignment < ApplicationRecord
      include Decidim::Traceable
      include Decidim::Loggable

      belongs_to :proposal, foreign_key: "decidim_proposal_id", class_name: "Decidim::Proposals::Proposal"
      belongs_to :valuator_role, polymorphic: true

      def self.log_presenter_class_for(_log)
        Decidim::Proposals::AdminLog::ValuationAssignmentPresenter
      end

      def valuator
        valuator_role.user
      end
    end
  end
end

Version data entries

46 entries across 46 versions & 1 rubygems

Version Path
decidim-proposals-0.26.10 app/models/decidim/proposals/valuation_assignment.rb
decidim-proposals-0.26.9 app/models/decidim/proposals/valuation_assignment.rb
decidim-proposals-0.28.0 app/models/decidim/proposals/valuation_assignment.rb
decidim-proposals-0.27.5 app/models/decidim/proposals/valuation_assignment.rb
decidim-proposals-0.28.0.rc5 app/models/decidim/proposals/valuation_assignment.rb
decidim-proposals-0.28.0.rc4 app/models/decidim/proposals/valuation_assignment.rb
decidim-proposals-0.26.8 app/models/decidim/proposals/valuation_assignment.rb
decidim-proposals-0.27.4 app/models/decidim/proposals/valuation_assignment.rb
decidim-proposals-0.27.3 app/models/decidim/proposals/valuation_assignment.rb
decidim-proposals-0.26.7 app/models/decidim/proposals/valuation_assignment.rb
decidim-proposals-0.26.5 app/models/decidim/proposals/valuation_assignment.rb
decidim-proposals-0.27.2 app/models/decidim/proposals/valuation_assignment.rb
decidim-proposals-0.27.1 app/models/decidim/proposals/valuation_assignment.rb
decidim-proposals-0.26.4 app/models/decidim/proposals/valuation_assignment.rb
decidim-proposals-0.27.0 app/models/decidim/proposals/valuation_assignment.rb
decidim-proposals-0.26.3 app/models/decidim/proposals/valuation_assignment.rb
decidim-proposals-0.27.0.rc2 app/models/decidim/proposals/valuation_assignment.rb
decidim-proposals-0.27.0.rc1 app/models/decidim/proposals/valuation_assignment.rb
decidim-proposals-0.26.2 app/models/decidim/proposals/valuation_assignment.rb
decidim-proposals-0.26.1 app/models/decidim/proposals/valuation_assignment.rb