Including methods and associations in a JSON Data set with Rails
I was poking around while working with creating an application specifically for web services. We decided to use JSON as the methods of transportation of data, but the problem came when I wanted to...
View ArticleRequest formats, filters, and functional tests…
I recently had to write some tests against a controller that was filtering based on the requesting format. In this case, I wanted to allow xml requests only, and redirect to login on everything else....
View ArticleHow to create PDF’s and Images from your website in Rails
I am going to show you how to generate both a pdf and image from a single action in a controller using the awesome, wkhtmltopdf library. This also uses PDFKit and WebSnap gems available on GitHub. This...
View ArticleMoved to a new host!
I have spend the last week setting up a new VPS host at Linode. This site and my youtube video playlist site, http://www.jamzee.com, are both currently running on the new host. Everything has been...
View ArticleCreate FFMPEG processor for Carrierwave in Rails 3
I have had the pleasure of working with the carrierwave gem recently (as opposed to paperclip), and I must say, I am quite the fan. Once major thing I missed however, was the available list of custom...
View ArticleHow to use Delayed Job to handle your Carrierwave processing
This tutorial builds on my previous post about how to add FFMPEG processing to Carrierwave. Here I will show you my attempt at being able to utilize Delayed::Job to do the heavy lifting of processing...
View ArticleValidating uniqueness of nested model on create
I recently ran into the issue where I setup a uniqueness validator on a field, with a scope on the parent’s ID. This was fine for updating with an existing parent, but if I ever created two or more new...
View ArticleFaster Rails Tests
Anyone that has worked on a large rails application knows how long it takes for tests to run. I have this same problem as well. I use the build in testing framework packaged with Rails. One thing I...
View ArticleZero Downtime Delayed Jobs
Here is a script I created that will do Zero Downtime Delayed Job restarts. This script will spin up a new set of delayed jobs workers and send a signal to the currently running workers to shut down...
View ArticleIntroducing Snugpage!
I know I have been gone a while. Family live really takes up your time. I also recently started a new job that has been going great and allows me to work from home! At any rate, if anyone has any ideas...
View Article