Warning: Because of (unclear) rounding issues and missing decimal places (see examples below), do NOT use this when dealing with...
Alternative approach to form models.
Great slide deck about various forms of refactorings.
tl;dr: Using has_many associations with a :through option can lead to lost or duplicate records. You should avoid...
We've since created ActiveType which has a restricted subset of Virtus' features. It might be enough for your needs...
Say you have a User with a Carrierwave attribute #avatar: class User < ActiveRecord::Base mount_uploader :avatar, AvatarUploader end
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.
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...
So you client has asked you to implement a row of buttons to like the URL on Facebook, Twitter and...
Using text-transform: uppercase - especially on form labels - can cause you serious headaches in Selenium tests. Sometimes the web driver...
A list of FontAwesome icons in the form of copyable Unicode characters or HTML entities. You might prefer to use...
I had some problems with Git and the file spec/fixtures/ČeskýÁČĎÉĚÍŇÓŘŠŤÚŮÝŽáčďéěíňóřšťúůýž. After pulling the latest commits, it would show that...
Simply give the select helper an option :disabled, passing either a single value or an array. You need to specify...
The ipad onscreen keyboard changes position:fixed style to position:static that misplaces those elements and you'll have problems...
1. Saving files to a directory that is not shared between deploys or servers If you save your uploads to...
You have multiple options: Just don't have a type column. All STI magic will be disabled automatically.
We have often felt the pain where our models need to serve too many masters. E.g. we are adding a...
JavaScripts and CSS should be minified for production use. In Rails 3.1+ the asset pipeline will take care of this...
If you need to capture signatures on an IPad or similar device, you can use Thomas J Bradley's excellent...
There is a bug in ActiveRecord 2.3.x that leads to changes in nested forms getting lost. class Project < ActiveRecord...
Spreewald now comes with a step that tests if a form field is visible: Then the "Due date" field should...
validates_uniqueness_of is not sufficient to ensure the uniqueness of a value. The reason for this is that in...