Skip to content

Commit

Permalink
install gem letter_opener_web
Browse files Browse the repository at this point in the history
  • Loading branch information
yshmarov committed Mar 9, 2024
1 parent df240bb commit 9f74f57
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 1 deletion.
1 change: 1 addition & 0 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ group :development do
# Add speed badges [https://github.com/MiniProfiler/rack-mini-profiler]
# gem "rack-mini-profiler"
gem 'letter_opener'
gem 'letter_opener_web', '~> 2.0'
end

group :test do
Expand Down
6 changes: 6 additions & 0 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,11 @@ GEM
addressable (~> 2.8)
letter_opener (1.8.1)
launchy (>= 2.2, < 3)
letter_opener_web (2.0.0)
actionmailer (>= 5.2)
letter_opener (~> 1.7)
railties (>= 5.2)
rexml
loofah (2.22.0)
crass (~> 1.0.2)
nokogiri (>= 1.12.0)
Expand Down Expand Up @@ -358,6 +363,7 @@ DEPENDENCIES
importmap-rails
jbuilder
letter_opener
letter_opener_web (~> 2.0)
meta-tags
pagy
passwordless!
Expand Down
3 changes: 2 additions & 1 deletion config/environments/development.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@

Rails.application.configure do
config.action_mailer.default_url_options = { host: 'localhost', port: 3000 }
config.action_mailer.delivery_method = :letter_opener
# config.action_mailer.delivery_method = :letter_opener
config.action_mailer.delivery_method = :letter_opener_web
config.action_mailer.perform_deliveries = true
# Settings specified here will take precedence over those in config/application.rb.

Expand Down
1 change: 1 addition & 0 deletions config/routes.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
ActiveSupport::SecurityUtils.secure_compare(Rails.application.credentials.dig(:http_auth, :password), password)
end
mount GoodJob::Engine, at: "good_job"
mount LetterOpenerWeb::Engine, at: "/letter_opener" if Rails.env.development?

root 'static_pages#landing_page'
get 'pricing', to: 'static_pages#pricing'
Expand Down

0 comments on commit 9f74f57

Please sign in to comment.