## Day03 Week03 - Shopping Site with Order Status

### Observation

Starting today I'm going to add a title to each blog post instead of the generic title of "DayXX WeekXX" so that I can tell from the title roughly what I'd be writing about.

I also successfully built the mailer function and allowed it to be previewed locally using gem letter_openter. But because the homework instruction has asked that we "complete the formatting" for the emails, I have not submitted the mail function screenshots. I learned that emails cannot be formatted as easily because once it's sent out it cannot read a separate .css file for formatting so all of the CSS need to be written inline. This would take forever given my lack of experience writing CSS, so I took some time figuring out how to use gems to help... but still working on it so more on that later when I have it all figured out.

I built the admin/orders page to view all orders without referencing any previous homework instructions, but by referencing the previous job-listing and rails103 homeworks codes.

### Reflective

The highlight today was when I logically figured out how to route admin/orders destroy action correctly between the Controller and Views. So up to this point, I would often copy/paste an CRUD action definition from another controller or a previous project, and test whether it would work for the current controller by trial-and-error. But this time I understood that because destroy method works on a single order, thus the order must be found, and the finding should be based on the token which was pre-generated when each order is created, so find_by_token(params[:id])

The low point today was when I tried to look up how to use gem roadie to figure out how email formatting works, it was not immediately clear to me how to do so. I found this website (https://cookieshq.co.uk/posts/how-to-style-emails-with-rails-and-roadie/) that seemed to have a very good instruction on how to build good-looking emails, but I couldn't follow the instructions entirely. I couldn't understand the following lines:

I will get some help on using gem roadie and see if I can get it working once I've completed the other development-oriented tasks.

### Interpretive

One thing I realized is that working on beautifying an app can take a very long time. Bootstrap is great, but it has one theme, a very "bootstrapped" theme. So while its functions can be tested, it could never make the kind of visual impact I'd like without some level of customization, or better yet, an entirely new theme from a shrewd designer.

### Decisional

Tomorrow I will work more efficiently and try to catch up with the tasks given. I think deployment will cause some headaches (with the mailer, key, and everything else that's different from developmeent environment).