Merge branch 'master' into admin-77

This commit is contained in:
Juanjo Bazán
2015-08-08 13:00:41 +02:00
38 changed files with 628 additions and 92 deletions

View File

@@ -17,4 +17,13 @@ class Comment < ActiveRecord::Base
def self.find_parent(params)
params[:commentable_type].constantize.find(params[:commentable_id])
end
def debate
commentable if commentable.class == Debate
end
def author
user
end
end