Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

added confirmation email and "forgot password" to sign up page #36

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ group :development do
gem "web-console"
gem "rubocop", require: false
gem "solargraph"
gem "letter_opener"
# Add speed badges [https://github.com/MiniProfiler/rack-mini-profiler]
# gem "rack-mini-profiler"

Expand Down
5 changes: 5 additions & 0 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,10 @@ GEM
rexml
kramdown-parser-gfm (1.1.0)
kramdown (~> 2.0)
launchy (2.5.0)
addressable (~> 2.7)
letter_opener (1.8.1)
launchy (>= 2.2, < 3)
loofah (2.18.0)
crass (~> 1.0.2)
nokogiri (>= 1.5.9)
Expand Down Expand Up @@ -311,6 +315,7 @@ DEPENDENCIES
importmap-rails
jbuilder
jquery-rails
letter_opener
mysql2 (~> 0.5)
pay (~> 6.0.3)
puma (~> 5.0)
Expand Down
3 changes: 2 additions & 1 deletion app/models/user.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@ class User < ApplicationRecord
# Include default devise modules. Others available are:
# :confirmable, :lockable, :timeoutable, :trackable and :omniauthable
devise :database_authenticatable, :registerable,
:recoverable, :rememberable, :validatable
:recoverable, :rememberable, :validatable,
:confirmable, :lockable, :trackable

# Set up paying customer
pay_customer default_payment_processor: :stripe
Expand Down
4 changes: 4 additions & 0 deletions config/environments/development.rb
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,10 @@
config.cache_store = :null_store
end

# letter opener
config.action_mailer.delivery_method = :letter_opener
config.action_mailer.perform_deliveries = true

# Store uploaded files on the local file system (see config/storage.yml for options).
config.active_storage.service = :local

Expand Down
23 changes: 23 additions & 0 deletions db/migrate/20221209021828_add_mailer_to_devise.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
class AddMailerToDevise < ActiveRecord::Migration[7.0]
def change
change_table :users do |t|
# Trackable
t.integer :sign_in_count, default: 0, null: false
t.datetime :current_sign_in_at
t.datetime :last_sign_in_at
t.string :current_sign_in_ip
t.string :last_sign_in_ip

# Confirmable
t.string :confirmation_token
t.datetime :confirmed_at
t.datetime :confirmation_sent_at
t.string :unconfirmed_email # Only if using reconfirmable

# Lockable
t.integer :failed_attempts, default: 0, null: false # Only if lock strategy is :failed_attempts
t.string :unlock_token # Only if unlock strategy is :email or :both
t.datetime :locked_at
end
end
end
56 changes: 30 additions & 26 deletions db/schema.rb

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.