Skip to content

Commit

Permalink
Clearer from label
Browse files Browse the repository at this point in the history
  • Loading branch information
parterburn committed Oct 20, 2024
1 parent 0ff179b commit 2d85503
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
10 changes: 5 additions & 5 deletions app/jobs/import_job.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
class ImportJob < ActiveJob::Base
queue_as :default

def perform(user_id,tmp_original_filename)
user = User.find(user_id)
dir = "public/ohlife_zips/#{user.user_key}"
Expand Down Expand Up @@ -42,7 +42,7 @@ def perform(user_id,tmp_original_filename)
else
# no existing_entry
error_count+=1
errors << file
errors << file
end
else
# not the right type of file
Expand All @@ -53,17 +53,17 @@ def perform(user_id,tmp_original_filename)

# Delete entire directory
FileUtils.rm_r dir, :force => true

messages << "Finished importing #{ActionController::Base.helpers.pluralize(count,'photo')}." if count > 0
messages << "\rError importing #{ActionController::Base.helpers.pluralize(error_count,'photo')}:" if error_count > 0
errors.each do |error|
messages << error
end

ActionMailer::Base.mail(from: "Dabble Me <hello@#{ENV['MAIN_DOMAIN']}>",
ActionMailer::Base.mail(from: "Dabble Me Team <hello@#{ENV['MAIN_DOMAIN']}>",
to: user.email,
subject: "OhLife Image Import is complete",
body: messages.join("\n\n")).deliver
end

end
end
2 changes: 1 addition & 1 deletion app/mailers/user_mailer.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ class UserMailer < ActionMailer::Base
helper EntriesHelper
helper :application

default from: "Dabble Me Support <hello@#{ENV['MAIN_DOMAIN']}>"
default from: "Dabble Me Team <hello@#{ENV['MAIN_DOMAIN']}>"

def welcome_email(user)
@user = user
Expand Down
2 changes: 1 addition & 1 deletion config/initializers/devise.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
# Configure the e-mail address which will be shown in Devise::Mailer,
# note that it will be overwritten if you use your own mailer class
# with default "from" parameter.
config.mailer_sender = "Dabble Me <hello@#{ENV['MAIN_DOMAIN']}>"
config.mailer_sender = "Dabble Me Team <hello@#{ENV['MAIN_DOMAIN']}>"

# Configure the class responsible to send e-mails.
# config.mailer = 'Devise::Mailer'
Expand Down

0 comments on commit 2d85503

Please sign in to comment.