adds mailer helper
This commit is contained in:
committed by
Juanjo Bazán
parent
536b0ce3f5
commit
08a1968fd2
8
app/helpers/mailer_helper.rb
Normal file
8
app/helpers/mailer_helper.rb
Normal 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
|
||||
@@ -1,5 +1,6 @@
|
||||
class Mailer < ApplicationMailer
|
||||
helper :text_with_links
|
||||
helper :mailer
|
||||
|
||||
def comment(comment)
|
||||
@comment = comment
|
||||
|
||||
Reference in New Issue
Block a user