ActionMailer SMTP settings for SendGrid (Rails)

Okay, I got no Google hits for this. Here’s a tip if you’re using SendGrid in a Rails app for your transactional emails. A while back you needed to provide your SendGrid username and password (hopefully via environment variables), but now you can use an app-specific api key.

Here’s some historical context. This was th...

Heroku defaults to Puma for Rails 5

It’s now going to be easier than ever to kick off a new Rails project and deploy to Heroku. WEBrick is no longer the default server with Rails 5. If you don’t provide a Procfile Heroku is going to help you out and set you up with Puma. Production ready out of the box. So… that’s cool.

Also of note, configuration is go...

How to Create a Contact Form Using Rails and Mandrill

Let’s build a simple contact form for your Rails driven website that uses Mandrill as the desired email server. Mandrill lets us offload the management of setting up and running an email server ourselves and, therefore, relieving ourselves of a massive headache. Mandrill starts you with 2,000 free trial sends which is ...

Syntax Highlighting in Rails

Your Rails driven website has the need to display some code. It’s not good enough to just get proper indentation, you’d like to have some decent syntax highlighting. Maybe something like following.

There’s a great ruby gem called Rouge that makes this process quite easy for us. What is Rouge?

Pretty cool, let’s get g...

Editing a form using fields_for in Rails

Let’s say you’d like to successfully create or update a nested form using fields_for. Our ‘parent’ will be a Post model and our ‘child’ will be a Tag model. It’s not hard, but there’s a bit of a gotcha that I found most other resources out there were leaving out.

We’ll use a Post model as our parent in this situation....

About These Posts

Matt Haliski's mug

My blog primarily contains writings about my work on computers, but I occasionally mix in fun life stuff. I am, at best, a mediocre writer, but I like doing my part to give back to the community. Feel free to contact me if you have specific something to chat about. See you around!