Add experimental machine learning

This commit is contained in:
Machine Learning
2021-06-18 12:27:29 +07:00
committed by Javi Martín
parent c8d8fae98d
commit 4d27bbebad
84 changed files with 2845 additions and 30 deletions

View File

@@ -41,6 +41,7 @@ class Proposal < ApplicationRecord
has_many :dashboard_executed_actions, dependent: :destroy, class_name: "Dashboard::ExecutedAction"
has_many :dashboard_actions, through: :dashboard_executed_actions, class_name: "Dashboard::Action"
has_many :polls, as: :related, inverse_of: :related
has_one :summary_comment, as: :commentable, class_name: "MlSummaryComment", dependent: :destroy
validates_translation :title, presence: true, length: { in: 4..Proposal.title_max_length }
validates_translation :description, length: { maximum: Proposal.description_max_length }