Merge branch 'master' into admin-77
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user