Created
August 12, 2008 20:06
-
-
Save pedro/5142 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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