If you want to inspect the compiled code of your erb (or haml) templates, you can run the following code...
Don't write resources :people, :concerns => :trashable Write resources :people do concerns :trashable end Why Writing a controller...
Chrome has discontinued support for 32-Bit Linux builds and this might break your apt-get update.
TL;DR There are three dimensions you can control when scoping routes: scope module: 'module', path: 'url_prefix', as: 'path...
Our preferred way of testing ActiveRecord is to simply create/update/destroy the record and then check if the expected behavior has...
Validations should be covered by a model's spec. This card shows how to test an individual validation. This is...
A HTTP 302 Found redirect to PATCH and DELETE requests will be followed with PATCH or DELETE. Redirect responses to...
From Rails 3.0.9, there is a method Hash#to_query that will turn a Hash into a query string:
I got this error when running Rails 2.3 tests for Rails LTS. More stacktrace: NoMethodError: undefined method `cache' for Gem...
Geordi is now (partially) tested with Cucumber. Yay! geordi cucumber supports a new @solo tag. Scenarios tagged with @solo...
Using Scenic, you can bring the power of SQL views to your Rails application without having to switch your schema...
Note The maintenance mode is enabled on all application server as soon as the file /public/system/maintenance.html is present. Installation
You login to a Linux server with a performance issue: what do you check in the first minute? uptime
Once Rails knows a given string is html_safe, it will never escape it. However, there may be times when...
PostgreSQL offers a really handy field type: json. You can store any JSON there, in any structure. While its flexibility...
rack-mini-profiler is a powerful Swiss army knife for Rack app performance. Measure SQL queries, memory allocation and CPU...
When you're using feature branches, they will stack up if you don't delete them after the merge to...
The nokogiri gem provides different packages for several platforms. Each platform-specific variant ships pre-built binaries of libxml2, e.g...
E-mails are usually encoded using Quoted Printable. Here is how to decode or encode such strings. You probably know...
As described by the linked Stackoverflow answer, run these commands: sudo add-apt-repository ppa:git-core/ppa -y
I recommend to go straight to 2.1.5+ without intermediate steps. Otherwhise you burden yourself with unnecessary work of encoding problems...
When there's a Gemfile.lock in your working directory that you cannot remove by either checkout, reset [--hard], stash, probably...
Live markdown previewer (with Github flavored syntax) for VIM. Will open a preview in your browser and update automatically on...
From time to time, RubyMine suddenly did not accept any keyboard input and felt crashed, while mouse interaction was still...