Let's say you have a model of a User. Let's say that if the user's birth year is 1990 or before, then you can't edit that user's first name. So you might have something like this: # User Class class User <…
Casey Li · November 3, 2020
Alright, like a lot of you, I'm loving that in Rails 6, we're moving all of our Javascript management to Webpacker by default. However, within this transition, we're losing a lot of the automatic functionality that…
Casey Li · October 29, 2020
So I just spent about 3 to 4 hours trying to debug this problem. Here's the setup We have a Rails application that uses a Gem that we wrote The Gem is pretty simple - a collection of classes that the Rails application…
Casey Li · October 23, 2020
So we've been using CarrierWave for a long time now for our Ruby on Rails projects. Even when we converted to direct upload, we were still using CarrierWave for image processing. It has stood the test of time and I've…
Casey Li · March 14, 2019
Update : The original posting of this article left out two key points that have to do with serving your videos over SSL and allowing your second Cloudfront instance to access your S3 MP4 bucket. Scroll down to the…
Casey Li · December 13, 2018
As you probably know from our previous blog posts, at BiteSite we recently started writing tests for our Rails apps using a combination of RSpec, factory_bot, and faker. We currently only write tests for our controllers…
Ryan O'Connor · July 27, 2018
Alright here's a weird one that would have been easy to solve if I thought more about how Ruby works (and how it's not like Java:)). So here was the issue, we were looping through a set of keys on a hash. Now, you…
Casey Li · July 27, 2018