Activity 1

Add a ship_date column to the orders table, and send a notification when this value is updated by the OrdersController.

Hint: Active Record provides dirty methods to enable you to check to see if a field has changed.

Discuss

Activity 2

Update the application to send an e-mail to the system administrator, namely yourself, when there is an application failure such as the one we handled in Section 10.2.

Hint: Create a new notifier specifically for errors.

Discuss

Activity 3

Add integration tests for both of the above.

Hint: ActionMailer::Base.deliveries contains the emails that would have been sent.

Discuss


Possible test error

I implemented line_item delete which used button_to method. This will result in a test error called ActionView::Template::Error: Missing host to link to! Please provide :host parameter or set default_url_options[:host] I have a “if not @cart.nil?” at the end of button_to to prevent this error