Cleaning up figures in Action Text

Action Text and Trix are great and give you an immense amount of power right out of the box. That being said, I didn’t like a bit of the styling for both the presentation of the...

Customizing the Trix toolbar

I recently added the Trix Editor to a Rails app I was working on and quickly found that I was going to need to do some modifications to the toolbar buttons. Out of the box, Trix only gives you an h1 button for creating headers and the site I was building was already populating an h1 tag...

Categories in a Rails App

Categorizing...

A gotcha with Active Storage and Cloudflare

Rails 5.2 introduced Active Storage and it’s pretty awesome. I’d used paperclip from the @thoughtbot folks for a long time, but file uploading is a requirement for just about any site these days so it might as well be part of the core. Now it is.

Well, if you happened to implement Active Storage into your...

Debugging in RubyMine with Rails 5.2

If you’ve upgraded to Rails 5.2 and are using RubyMine’s debugger you might notice that breakpoints aren’t working as they should. For me, they would only work in views, but controllers and models wouldn’t stop anything.

Turns out the problem is the inclusion of the Bootsnap gem in Rails 5.2. Bootsnap is ...

Custom validation in Rails

Here’s a little trick I like to do when I’m addressing validations in my models. Let’s say you have a standard...

System Tests with RSpec, Rails, Capybara, and Devise

Since the release of RSpec 3.7 we’ve been able to take advantage of system tests which are new as of Rails 5.1. If you’ve been using RSpec for a while you’re already likely familiar with feature tests using Capybara. For those new to these types of tests: they allow us to test the actual actions of a user. Clicki...

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...

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...

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 whi...

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!