* Throw away old system * Add new system * Add new example files * Replace all calls * add the most important docs * Add Specs * rename disable_ssl_requirement to require_ssl * cloudfiles isn't used/called in our code * since community_spotlight.list is only used as enable flag replace it with such one and remove all legacy and irelevant codepaths around it * die if session secret is unset and on heroku * First basic infrastructure for version information
22 lines
641 B
Ruby
22 lines
641 B
Ruby
module NotificationMailers
|
|
class AlsoCommented < NotificationMailers::Base
|
|
include ActionView::Helpers::TextHelper
|
|
|
|
attr_accessor :comment
|
|
delegate :post, to: :comment, prefix: true
|
|
|
|
def set_headers(comment_id)
|
|
@comment = Comment.find_by_id(comment_id)
|
|
|
|
if mail?
|
|
@headers[:from] = "\"#{@comment.author_name} (Diaspora*)\" <#{AppConfig.mail.sender_address}>"
|
|
@headers[:subject] = truncate(@comment.comment_email_subject, :length => TRUNCATION_LEN)
|
|
@headers[:subject] = "Re: #{@headers[:subject]}"
|
|
end
|
|
end
|
|
|
|
def mail?
|
|
@recipient && @sender && @comment
|
|
end
|
|
end
|
|
end
|