adds mailer helper

This commit is contained in:
Juanjo Bazán
2015-09-24 12:38:05 +02:00
committed by Juanjo Bazán
parent 536b0ce3f5
commit 08a1968fd2
2 changed files with 9 additions and 0 deletions

View File

@@ -0,0 +1,8 @@
module MailerHelper
def commentable_url(commentable)
return debate_url(commentable) if commentable.is_a?(Debate)
return proposal_url(commentable) if commentable.is_a?(Proposal)
end
end

View File

@@ -1,5 +1,6 @@
class Mailer < ApplicationMailer
helper :text_with_links
helper :mailer
def comment(comment)
@comment = comment