Inky Code


Niky Morgan: New York-based Web Developer

Many to Many Associations with ActiveRecord

I’ve spent the past three months in Ruby-and-Rails-land, teaching dozens of Flatiron students the basics of ActiveRecord. One of the concepts we really focus on early in our curriculum is the many-to-many relationship. We have students use the has many through ActiveRecord association for this, but at some point they stumble upon the has and belongs to many association and wonder what the differences are between the two.


Creating a Contact Form with AWS Lambdas

I recently moved my web hosting to AWS. (Blog post here.) I knew from friends that hosting a static site on AWS is relatively cheap and easy, so I was sure I’d be able to make the switch. However, I didn’t take the time to consider that not all the elements of my site were static.


Redirecting a WWW Subdomain on AWS

While the instructions for redirecting a www subdomain to the apex (base) domain on an AWS-hosted site may not encompass many steps, I had to employ a fair amount of googling and testing in order to get this working on my site. My website is nikym.org, and I wanted to ensure that any requests to www.nikym.org redirected to nikym.org. Furthermore, I wanted any requests to an HTTP version of the site to redirect to the HTTPS version.


Transferring DNS and Web Hosting to AWS

I recently decided to move my personal website hosting to AWS. I did this for a few reasons:

  • the rate for web hosting on GoDaddy went up significantly for the second year
  • static website hosting on AWS is relatively simple and cost pennies a month
  • I recently had dipped my toe into AWS for work and wanted to experiment with it more

Updating to React Router v4

Our team recently updated Learn.co from React 15 to 16, and I took part in a subsequent sprint to update our React Router from version 2 to version 4. React Router 4 is conceptually very different from the previous versions; the creators wrote the new version entirely in React with an API that followed common React patterns. The Route is now just a component which makes nesting routes an easier task. This design difference meant we had to implement React Router 4 in a completely different manner than we used 2. Here are some of the biggest changes we made in our upgrade.