Method: EntriesHelper#link_to_commentable

Defined in:
app/helpers/entries_helper.rb


65
66
67
68
69
70
71
72
73
74
75
76
# File 'app/helpers/entries_helper.rb', line 65

def link_to_commentable(commentable, user)
  case commentable.class.to_s
    when Entry.to_s
      entry_link(commentable, user)
    when Post.to_s
      post_link(commentable)
    when News.to_s
      news_link(commentable)
    else
      commentable.class.to_s
  end
end