Fix buggy associations

This commit is contained in:
Alberto Miedes Garcés
2017-01-27 14:27:28 +01:00
parent cb06075c68
commit 6b47ce065f
4 changed files with 3 additions and 7 deletions

View File

@@ -17,7 +17,6 @@ class Debate < ActiveRecord::Base
belongs_to :author, -> { with_hidden }, class_name: 'User', foreign_key: 'author_id'
belongs_to :geozone
has_many :comments, as: :commentable
has_many :votes, -> { for_debates }, foreign_key: 'votable_id'
validates :title, presence: true
validates :description, presence: true