houndci fixes
This commit is contained in:
parent
23bf55b66c
commit
9292b79c78
13 changed files with 151 additions and 144 deletions
|
|
@ -1,19 +1,21 @@
|
|||
class EmailSettings < ActiveRecord::Base
|
||||
attr_accessible :send_on_registration, :send_on_accepted, :send_on_rejected, :send_on_confirmed_without_registration,
|
||||
:registration_email_template, :accepted_email_template, :rejected_email_template, :confirmed_email_template,
|
||||
:registration_subject, :accepted_subject, :rejected_subject, :confirmed_without_registration_subject
|
||||
attr_accessible :send_on_registration, :send_on_accepted, :send_on_rejected,
|
||||
:send_on_confirmed_without_registration, :registration_email_template,
|
||||
:accepted_email_template, :rejected_email_template, :confirmed_email_template,
|
||||
:registration_subject, :accepted_subject, :rejected_subject,
|
||||
:confirmed_without_registration_subject
|
||||
|
||||
def get_values(conference, user, event = nil)
|
||||
h = {
|
||||
"email" => user.email,
|
||||
"name" => user.name,
|
||||
"conference" => conference.title,
|
||||
"registrationlink" => Rails.application.routes.url_helpers.register_conference_url(conference.short_title, :host => CONFIG["url_for_emails"])
|
||||
'email' => user.email,
|
||||
'name' => user.name,
|
||||
'conference' => conference.title,
|
||||
'registrationlink' => Rails.application.routes.url_helpers.register_conference_url(conference.short_title, host: CONFIG['url_for_emails'])
|
||||
}
|
||||
|
||||
if !event.nil?
|
||||
h["eventtitle"] = event.title
|
||||
h["proposalslink"] = Rails.application.routes.url_helpers.conference_proposal_url(conference.short_title, event, :host => CONFIG["url_for_emails"])
|
||||
h['eventtitle'] = event.title
|
||||
h['proposalslink'] = Rails.application.routes.url_helpers.conference_proposal_url(conference.short_title, event, host: CONFIG['url_for_emails'])
|
||||
end
|
||||
h
|
||||
end
|
||||
|
|
@ -24,7 +26,6 @@ class EmailSettings < ActiveRecord::Base
|
|||
parse_template(template, values)
|
||||
end
|
||||
|
||||
|
||||
def generate_accepted_email(event)
|
||||
values = get_values(event.conference, event.submitter, event)
|
||||
template = self.accepted_email_template
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue