Module: CommentsHelper
- Defined in:
- app/helpers/comments_helper.rb
Overview
Helper methods for handling comments
Instance Method Summary collapse
- #admin_comment_link(entity, text = entity.text_for_link, options = {}) ⇒ Object
- #comment_link(entity, text = entity.commentable_name, options = {}) ⇒ Object
Instance Method Details
#admin_comment_link(entity, text = entity.text_for_link, options = {}) ⇒ Object
8 9 10 |
# File 'app/helpers/comments_helper.rb', line 8 def admin_comment_link(entity, text = entity.text_for_link, = {}) link_to(text, admin_comment_path(id: entity.id), ) end |
#comment_link(entity, text = entity.commentable_name, options = {}) ⇒ Object
15 16 17 18 19 |
# File 'app/helpers/comments_helper.rb', line 15 def comment_link(entity, text = entity.commentable_name, = {}) anchor = .key?(:anchor) .delete(:anchor) link_to(text, CommentsManager.commentable_path(entity, anchor), ) end |