Sha256: 6a7ea0902fbb5dcc14cb85e88413d7f039049ec45d09205c63a5561f16389a02
Contents?: true
Size: 569 Bytes
Versions: 17
Compression:
Stored size: 569 Bytes
Contents
# frozen-string_literal: true module Decidim module Comments class CommentCreatedEvent < Decidim::Events::SimpleEvent include Decidim::Events::AuthorEvent delegate :author, to: :comment def resource_path resource_locator.path(url_params) end def resource_url resource_locator.url(url_params) end private def comment @comment ||= Decidim::Comments::Comment.find(extra[:comment_id]) end def url_params { anchor: "comment_#{comment.id}" } end end end end
Version data entries
17 entries across 17 versions & 1 rubygems