diff --git a/Gemfile b/Gemfile index 1b684fee..0cd63abf 100644 --- a/Gemfile +++ b/Gemfile @@ -19,6 +19,8 @@ gem 'jquery-rails' gem 'turbolinks' # HAML as default gem 'haml-rails' +# To test email with letter opener set the 'async_emails' option in site.yml to false +gem 'letter_opener_web' group :doc do # bundle exec rake doc:rails generates the API under doc/api. diff --git a/Gemfile.lock b/Gemfile.lock index 5fc563e8..8d6be10f 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -30,6 +30,8 @@ GEM minitest (~> 5.1) thread_safe (~> 0.1) tzinfo (~> 1.1) + addressable (2.5.1) + public_suffix (~> 2.0, >= 2.0.2) afm (0.2.2) arel (5.0.1.20140414130214) ast (2.3.0) @@ -138,11 +140,19 @@ GEM kaminari (0.16.3) actionpack (>= 3.0.0) activesupport (>= 3.0.0) + launchy (2.4.3) + addressable (~> 2.3) less (2.6.0) commonjs (~> 0.2.7) less-rails (2.6.0) actionpack (>= 3.1) less (~> 2.6.0) + letter_opener (1.4.1) + launchy (~> 2.2) + letter_opener_web (1.3.1) + actionmailer (>= 3.2) + letter_opener (~> 1.0) + railties (>= 3.2) libv8 (3.16.14.7) localized_country_select (0.9.11) actionpack (>= 3.0) @@ -175,6 +185,7 @@ GEM prawn_rails (0.0.11) prawn (>= 0.11.1) railties (>= 3.0.0) + public_suffix (2.0.5) rack (1.5.5) rack-test (0.6.3) rack (>= 1.0) @@ -347,6 +358,7 @@ DEPENDENCIES jquery-rails kaminari less-rails + letter_opener_web localized_country_select pdf-reader prawn (~> 0.13.0) diff --git a/config/environments/development.rb b/config/environments/development.rb index c43aad49..8b78395a 100644 --- a/config/environments/development.rb +++ b/config/environments/development.rb @@ -15,7 +15,8 @@ # Don't care if the mailer can't send config.action_mailer.raise_delivery_errors = false - config.action_mailer.delivery_method = :smtp + #To use letter opener change :smtp to :letter_opener + config.action_mailer.delivery_method = :smptp config.action_mailer.smtp_settings = { :address => "localhost", :port => 1025 } # Print deprecation notices to the Rails logger diff --git a/config/routes.rb b/config/routes.rb index e6c60bbe..7cf090b9 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -1,4 +1,6 @@ TravelSupport::Application.routes.draw do + mount LetterOpenerWeb::Engine, at: "/letter_opener" + devise_for :users, :controllers => { :registrations => 'registrations', :ichain_registrations => "ichain_registrations"},