Module: CommentsHelper
- Defined in:
- app/helpers/comments_helper.rb
Instance Method Summary collapse
Instance Method Details
#link_to_reportable(report) ⇒ Object
2 3 4 5 6 7 8 9 10 11 12 |
# File 'app/helpers/comments_helper.rb', line 2 def link_to_reportable(report) reportable = report.object.try(:entity) || report.object return if reportable.nil? if reportable.is_a? User link_to reportable.username, settings_user_path(reportable) elsif reportable.is_a? Comment link_to reportable.name, reportable.commentable else link_to reportable.name, reportable end end |