Skip to content

Commit

Permalink
Fixed up some things with mailer - now working again
Browse files Browse the repository at this point in the history
  • Loading branch information
Ryan Neufeld committed Jul 3, 2009
1 parent b1eeeae commit c205c21
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions app/models/freemailer_campaign.rb
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ def preview
fill_template(preview_user)
end

def send
def send_campaign
if not sent
contacts.each do |contact|
begin
Expand All @@ -43,7 +43,6 @@ def send
end
end
end
private

def preview_user
{
Expand All @@ -70,11 +69,13 @@ def fill_template_for_contact(person)

def fill_template(user_hash)
user_hash.default = ''
body_template.gsub(/\{(.*)\}/) do |item|
body_template.gsub(/\[\[(.*)\]\]/) do |item|
user_hash[$1].to_s
end
end

private

def remove_active_campaign
debugger
if sender.active_campaign == self
Expand Down

0 comments on commit c205c21

Please sign in to comment.