paulrayner/ddd_sample_app_ruby — pull request #61 by drsharp (2014-09-17 05:29:31+00:00)
Title: Built Bookings creation. Added some fancier layout/display.

The primary part of this pull request is building the :new and :create action for BookingsController. This uses a Booking model to process the form and internally create the cargo, which is passed to the persistence adapter.

The Booking model gives a place to put Rails form validations, flash message display, and anything else it might need.

I also pulled in a bootstrap format template that looks pretty good and did some overall cleanup.
Two small things: (1) I switched from pry-debugger to pry-byebug as that's the recommendation, and (2) the check via MongoDB to see if a Cargo exists and then delete it was broken. That's been fixed.

NOTE: the cargo's TrackingId is saved as 'cargo_X', where X is a random 6 alphanumeric characters. Eventually this should be a UUID.

ALSO NOTE: I hacked the itinerary (for now) so the cargo will save. I just made it be a single leg: the origin and destination, having left 5 days before and arrived 3 days before the arrival_deadline.