Passionate Development From Journeyman to Master

Uninitalized Constant Notifier

I went through Chapter 13: Task H: Sending Mail of Agile Web Development with Rails today and stumbled upon an error.

This is error that I got when testing the order email send out functionality.

[ruby] NameError (uninitialized constant OrdersController::Notifier): app/controllers/orders_controller.rb:68:in block in create' app/controllers/orders_controller.rb:57:in create’ [/ruby]

The supposedly offending code is this: [ruby] Notifier.order_received(@order).deliver [/ruby]

After some futile investigation attempts - I restarted Rails and it worked!

ruby on rails