AyuntamientoMadrid/participacion

View on GitHub
app/models/budget/reclassified_vote.rb

Summary

Maintainability
A
0 mins
Test Coverage
class Budget
  class ReclassifiedVote < ApplicationRecord
    REASONS = %w[heading_changed unfeasible].freeze

    belongs_to :user
    belongs_to :investment

    validates :user, presence: true
    validates :investment, presence: true
    validates :reason, inclusion: { in: ->(*) { REASONS }, allow_nil: false }
  end
end