class Answer < ActiveRecord::Base
  belongs_to :question
  belongs_to :user
  has_many :comments, as: :commentable
  has_many :votes, as: :votable

  validates_presence_of :content, :question_id, :user_id


end

class Answer < ActiveRecord::Base
  belongs_to :question
  belongs_to :user
  has_many :comments, as: :commentable
  has_many :votes, as: :votable

  validates_presence_of :content, :question_id, :user_id

  def score
  	count = 0
  	self.votes.each do |vote|
  	 count = count + vote.status
  	end
  	count
  end
end

Add score method to Answer model
Add score method to Answer model
