Creating a Custom Formtastic File Upload Input with Image Thumbnail
March 26th, 2012 // 11:50 am @ matt
Just today, I ran into a situation where I wanted to modify the output generated by Formtastic while building an input element. In this particular scenario, the input field was a file input in which the user is expected to upload an image (PNG, JPG, or GIF). The customization I wanted was the ability to [...]
Read More »Implement Multiple Table Inheritance Into Your ActiveRecord Models
March 11th, 2012 // 10:05 pm @ matt
This past week, I released my first ever Ruby gem: multiple_table_inheritance. Multiple Table Inheritance is an ActiveRecord plugin designed for Rails 3.0+ designed to make table-level inheritance easier than ever. Imagine you have an application that needs to maintain a list of employees. You’ll probably start out with a few columns including first name, last [...]
Read More »Rotating Paperclip Image Attachments in Rails
October 22nd, 2011 // 3:30 pm @ matt
With users uploading personal photos, especially ones coming their phones that capture landscape photos in portrait mode and vice versa, one of the things I wanted to integrate into Black Book Singles is the ability to rotate photos. Since I’m using the Paperclip gem, this should be relatively easy to achieve through a custom attachment [...]
Read More »