- Implement AccountActivationsController for activation logic - Create UserMailer for sending activation emails - Update SessionsController to handle unactivated users - Modify UsersController to restrict access to activated users - Add activation fields to User model and database migration - Create views for account activation emails - Add tests for account activation functionality
23 lines
532 B
Ruby
23 lines
532 B
Ruby
class UserMailer < ApplicationMailer
|
|
# Subject can be set in your I18n file at config/locales/en.yml
|
|
# with the following lookup:
|
|
#
|
|
# en.user_mailer.account_activation.subject
|
|
#
|
|
def account_activation(user)
|
|
@user = user
|
|
mail to: user.email, subject: "Account activation"
|
|
end
|
|
|
|
# Subject can be set in your I18n file at config/locales/en.yml
|
|
# with the following lookup:
|
|
#
|
|
# en.user_mailer.password_reset.subject
|
|
#
|
|
def password_reset
|
|
@greeting = "Hi"
|
|
|
|
mail to: "to@example.org"
|
|
end
|
|
end
|