Drew Bragg

Drew Bragg @drbragg

About: Full Stack Dev && Single Dad && Board Game Geek && Hockey Player

Location:
Warrington, PA
Joined:
Feb 8, 2018

Drew Bragg
articles - 32 total

New Episode! Chris Oliver on Code and the Coding Coders who Code it

Episode 7 - Chris Oliver Code and the Coding Coders who Code...

Learn More 6 0Jun 9 '22

The Curious Case of the DATA Constant

If you're unfamiliar with Ruby's DATA constant don't feel too bad, it's an easy one to miss. Not...

Learn More 6 1Dec 3 '21

Using the new `weekday_select` in Rails 7

In most of the Rails apps I've built over the years I've had to add my own helpers for a weekday...

Learn More 30 1Sep 22 '21

Using Mail Interceptors in Rails

I stumbled upon a super neat feature of ActionMailer the other night. If you scroll all the way to...

Learn More 17 3Aug 19 '21

Rails Design Patterns: Form Object

Form Object Pattern There are a number of design patterns that will help improve your Rail...

Learn More 60 2Jun 2 '21

for/in vs. each in Ruby: More than just syntax

During a recent PR review I found myself having to explain why we would want to use each over for/in...

Learn More 6 3Apr 6 '21

Introducing the Rails class_names method

New to Rails 6.1 is a method called class_names, from the ActionView::Helpers::TagHelper module. This...

Learn More 14 1Mar 22 '21

Giving credit where credit is due

About a month ago I wrote an article on an issue I had run into a few times and the solution I eventu...

Learn More 20 2Jun 23 '20

Reset Postgres ID sequence in Rails

Today I had to restore backup data from one of our SQL dumps to my local development database. For o...

Learn More 7 0Jun 18 '20

TIL: alias in Ruby

Today I learned (learnt?) about the alias keyword in Ruby. I'm not sure how I've gone this long worki...

Learn More 27 3Jun 2 '20

taco_tuesday gem, now with more tacos

Thanks to Colin Bartlett's awesome contribution to the taco_tuesday gem version 0.2.0 has been releas...

Learn More 6 0Jun 2 '20

The taco_tuesday gem, cause Tacos

For years I've had to add: class Date def taco_tuesday? tuesday? end end to my ruby pro...

Learn More 6 3Jun 1 '20

Manifest vs head icons in the Vue CLI PWA Plugin

A couple of weeks ago I opened a PR to update the documentation of the Vue CLI, specifically the PWA...

Learn More 11 2May 30 '20

Handling Service Worker updates in your Vue PWA

Table Of Contents Updating the Service Worker registration Making an update mixin Updatin...

Learn More 198 35May 14 '20

Aaron Patterson's keynote was fantastic

I have always found Aaron Patterson to be hilarious even when bordering on longwinded. I think his op...

Learn More 5 0May 7 '20

Twiddle-wakka (Yes, that's a real thing)

You may or may not know that Ruby has a pessimistic operator: ~> It's actually a pretty cool...

Learn More 9 3Oct 18 '19

Dev.to is presenting Hacktoberfest?!

I just saw the Hacktoberfest pre-lauch site and noticed that the DEV logo was there! This awesome!...

Learn More 42 7Sep 5 '19

Adding missing indexes in your Rails App

It's easy to forget to index a model relation. Here's how to find and add it.

Learn More 15 0Aug 15 '19

How to teach a non-tech person to test an app

My company hires a few interns every summer. Sometimes they are hired for a specific department...

Learn More 4 3Jun 12 '19

I like to hit vulcanized rubber disks with a stick.

What do you like to do?

Learn More 9 4Jan 9 '19

Dear future programmer

My version of what launch told me when I started.

Learn More 94 12Dec 11 '18

acts-as-taggable-on causing SQL errors when ordered by relation

I’m having a weird issue with acts-as-taggable-on when using tagged_with and the any flag. My model...

Learn More 6 3Dec 5 '18

Where to start refactoring.

One of the first apps I built for my company is still in use today and occasionally gets new...

Learn More 10 16Nov 12 '18

Today I fixed a bug using the best method name ever

Yes, that's right, Rails has a method named squish. I'll never use gsub again

Learn More 19 3Nov 9 '18

Handling ActiveStorage direct uploads and server side form validations

Ok, so this is slightly hacky. Let me also preface this by saying there's probably no real need to do...

Learn More 14 8Oct 31 '18

LibertyJS, who's going?

Philly Devs, who's going to LibertyJS?

Learn More 7 8Oct 31 '18

Taco Tuesday

Too busy for a real post but never too busy for tacos

Learn More 14 3Oct 16 '18

Deploying a Rails app to Digital Ocean with Capistrano

Basic server set up to to deploy your application with capistrano

Learn More 55 4Oct 4 '18

The Dangers of Drinking and Refactoring

WTF is this shit

Learn More 30 2Sep 21 '18

Lessons I learned from training with special forces that I use in software development

I've had the unique opportunity to train with and be taught by some of Military's best. Who knew that the best warfighters had great insight into programming.

Learn More 94 10Sep 20 '18