Say you have a User with a Carrierwave attribute #avatar: class User < ActiveRecord::Base mount_uploader :avatar, AvatarUploader end
When you want to find out the data type of an attribute, you can just use ActiveRecord's columns_hash...
Note - This is not a tutorial on setup or configuration of Secure Shell, but is an overview of technology which...
Syn is a synthetic event library that pretty much handles typing, clicking, moving, and dragging exactly how a real user...
Use protocol independent URLs whenever possible so that the browser will choose the protocol related to the protocol which the...
When I upgraded from 0.5.4 PDFKit deadlocked or crashed when an ApplicationController::RouteError occured. If this error happens only because...
Ubuntu 12.04 LTS x64, Ruby 1.8.7, Rails 2.13, PDFKit 0.5.4, Phusion Passenger Apache 2 I ran into this, when I...
Font Awesome 4 has renamed all icons. What the fuck. Check the attached link for an icon list for the...
Whenever you create a table from a database migration, remember to add updated_at and created_at timestamps to that...
Motion is quickly becoming one of the most important emerging techniques in building a quality user experience on the web...
Advice for address forms that work with address structures from multiple countries.
If you need to enable NewRelic monitoring on certain machines within the same Rails environment, a simple solution is to...
Rails has always included a scaffold script that generates a default controller implementation for you. Unfortunately that generated controller is...
It is good programming practice to Don't Repeat Yourself (or DRY). In Ruby on Rails we keep our code...
If you need to test interaction with a remote API, check out the VCR gem as an alternative to Webmock...
So you client has asked you to implement a row of buttons to like the URL on Facebook, Twitter and...
The default configuration of Rails disables CSRF protection in tests. If you accidentally forget to send the CSRF token for...
Chrome extension that shows all info from your rails log (like parameters, response times, view rendering times, DB requests) inside...
If you want to have routes that are only available in tests (e.g. for testing obscure redirects), you can use...
When writing Rails migrations to convert a string column to an integer you'd usually say: change_column :table_name...
I recently experienced the error ActiveRecord::StatementInvalid: Mysql2::Error: closed MySQL connection. Apparently this happens when there is a timeout...
Working with lists in Javascript is painful because the native Array class is so poorly designed. One way to reduce...
So you're switching to PostgreSQL from MySQL? Here is some help... General hints on PostgreSQL \? opens the command overview...
Using text-transform: uppercase - especially on form labels - can cause you serious headaches in Selenium tests. Sometimes the web driver...