Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
class UsersController ...
def create
@user = User.create(params[:user])
Notifier.deliver_activation(@user)
redirect_to :controller => :dashboard
rescue Exception => e
logger.error e
...
end
end
class UsersController ...
def create
@user = User.create(params[:user])
Notifier.deliver_activation(@user)
flash[:notice] = "Check your email to active your account"
rescue Heroku::Mailer::DailyQuotaReached
logger.warn "Reached the daily limit of outgoing emails! Skipping activation"
@user.activate
flash[:notice] = 'Thank you, your account is ready :)'
rescue Exception => e
logger.error e
...
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment