diff --git a/Gemfile b/Gemfile index 43dceb3ff..73325d81d 100644 --- a/Gemfile +++ b/Gemfile @@ -41,10 +41,8 @@ gem 'ckeditor' group :development, :test do # Call 'byebug' anywhere in the code to stop execution and get a debugger console gem 'byebug' - # Access an IRB console on exception pages or by using <%= console %> in views gem 'web-console', '~> 2.0' - # Spring speeds up development by keeping your application running in the background. Read more: https://github.com/rails/spring gem 'spring' gem 'rspec-rails', '~> 3.0' @@ -52,6 +50,7 @@ group :development, :test do gem 'factory_girl_rails' gem 'launchy' gem 'quiet_assets' + gem 'letter_opener_web', '~> 1.2.0' end group :test do diff --git a/Gemfile.lock b/Gemfile.lock index 675d3d304..9dad0c3ec 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -108,6 +108,11 @@ GEM json (1.8.3) launchy (2.4.3) addressable (~> 2.3) + letter_opener (1.4.1) + launchy (~> 2.2) + letter_opener_web (1.2.3) + letter_opener (~> 1.0) + rails (>= 3.2) loofah (2.0.2) nokogiri (>= 1.5.9) mail (2.6.3) @@ -234,6 +239,7 @@ DEPENDENCIES jbuilder (~> 2.0) jquery-rails launchy + letter_opener_web (~> 1.2.0) pg poltergeist quiet_assets @@ -247,3 +253,6 @@ DEPENDENCIES turbolinks uglifier (>= 1.3.0) web-console (~> 2.0) + +BUNDLED WITH + 1.10.5 diff --git a/config/environments/development.rb b/config/environments/development.rb index e9d8fdb80..63168eb28 100644 --- a/config/environments/development.rb +++ b/config/environments/development.rb @@ -17,6 +17,9 @@ Rails.application.configure do config.action_mailer.raise_delivery_errors = false config.action_mailer.default_url_options = { host: 'localhost', port: 3000 } + # Deliver emails to a development mailbox at /letter_opener + config.action_mailer.delivery_method = :letter_opener + # Print deprecation notices to the Rails logger. config.active_support.deprecation = :log diff --git a/config/routes.rb b/config/routes.rb index f5afd988c..cd95b8461 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -61,4 +61,8 @@ Rails.application.routes.draw do # # (app/controllers/admin/products_controller.rb) # resources :products # end + + if Rails.env.development? + mount LetterOpenerWeb::Engine, at: "/letter_opener" + end end