Files
nairobi/app/models/dashboard/executed_action.rb
Javi Martín 27ed26d6f2 Remove unnecessary class names in relations
Just like we do in the Budget module, and in some places in the Poll and
Legislation modules, we don't need to specify the class name when the
name of the relation matches the name of a class in the same module.
2019-10-25 19:03:14 +02:00

11 lines
315 B
Ruby

class Dashboard::ExecutedAction < ApplicationRecord
belongs_to :proposal
belongs_to :action
has_many :administrator_tasks, as: :source, dependent: :destroy
validates :proposal, presence: true, uniqueness: { scope: :action }
validates :action, presence: true
validates :executed_at, presence: true
end