Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Small sample app that contains call to bugged deliver! method (letter_opener v0.0.2)
Ruby JavaScript CoffeeScript
branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
app
config
db
doc
lib
log
public
script
test
vendor
.gitignore
.rvmrc
Gemfile
Gemfile.lock
README
Rakefile
config.ru

README

In letter_opener (https://github.com/ryanb/letter_opener) version 0.0.2 there exists a bug in which calling deliver! (instead of deliver) causes no email to open in your browser and produces this error in your log:

NoMethodError (undefined method `settings' for #<LetterOpener::DeliveryMethod:0x000001036b5ba8>):
  app/controllers/users_controller.rb:3:in `new'

Rendered vendor/ruby/1.9.1/gems/actionpack-3.1.0/lib/action_dispatch/middleware/templates/rescues/_trace.erb (1.5ms)
Rendered vendor/ruby/1.9.1/gems/actionpack-3.1.0/lib/action_dispatch/middleware/templates/rescues/_request_and_response.erb (1.2ms)
Rendered vendor/ruby/1.9.1/gems/actionpack-3.1.0/lib/action_dispatch/middleware/templates/rescues/diagnostics.erb within rescues/layout (5.1ms)


Figure out where the bug is and how to fix it.  Please explain how you did so.


To install:

git clone git://github.com/pcg79/letter_opener_bug.git
cd letter_opener_bug
<accept .rvmrc file (or not)>
bundle install
bundle exec rails s
Something went wrong with that request. Please try again.