Your after_commit callbacks will not know about changes, as Rails discards them when committing. The linked article shows a...
This blew my mind today: 12 Little-Known CSS Facts 12 Little-Known CSS Facts (The Sequel) Please make sure...
Very detailed guide to caching Ruby on Rails. Goes well with the official Rails guide on caching.
If you see a stacktrace beginning with lines like this: E, [2015-07-16T09:23:10.896146 #23308] ERROR -- : app...
If a SOAP API expects you to call a remote method with arguments of complex types, Savon lets you manually...
CSS (+ some Javascript) framework, implementing Google's material design for static web pages. Can be used for plain websites without...
Disabling auto-complete in login forms is probably a bad idea, since it encourages weak passwords. If you are still...
In my RubyMine I have recorded two macros for debugging and linked them to some keyboard shortcuts. Since I believe...
Today I ran into this: Invalid gemspec in [/usr/local/rvm/gems/ruby-1.9.3-p194/specifications/ZenTest-4.9.3.gemspec]: Illformed requirement ["< 2.1, >= 1.8"]. You need a newer Rubygems version. Try...
Small web application where you can upload an image (PNG, JPEG, GIF) and generate a base64-encoded version of it...
Rails comes with grouped_collection_select that appears to be useful, but isn't. As an alternative, consider the flat...
When working with ActiveType you will often find it useful to cast an ActiveRecord instance to its extended ActiveType::Record...
Note: ActiveRecord::Base#becomes has a lot of quirks and inconsistent behavior. You probably want to use ActiveType.cast instead.
To disable the mostly useless automatic suggestion popups in RubyMine, go to File / Settings, then to Editor / General / Code Completion...
Starting from 4.1, Rails automatically detects the inverse of an association, based on heuristics. Unfortunately, it does not seem to...
Since version 2.6 exception notifier distinguishes between foreground and background sections. The reason is that with background jobs (e.g. methods...
Good article about ruby singleton classes.
ActiveModel supplies an errors object that behaves similar to a Hash. It can be used to add errors to a...
Developing complex regular expressions quickly blows my mind. Here are some online regex editors that help you by highlighting matching...
Note: Making a reverse proxy with nginx is much more straightforward. A reverse proxy is a "man in the middle...
When you register a delegated event using on (or the deprecated delegate / live), it is somewhat hard to manually trigger...
All major browsers (IE8+, FF3.5+, Safari 4+, any Chrome) support sessionStorage, a JavaScript storage object that survives page reloads and...
Capistrano 3 is a major rework of the framework and requires several adjustments to your deploy configuration files. The biggest...
If you have FactoryGirl traits like this: factory :movie do title 'Sunshine' year 2007 trait :vintage do year 1951