For clarity and traceability, your commit messages should include the ID and title of the Pivotal Tracker story you're...
git diff commit_hash -- path/to/file Provide any commit hashes or branch names like "master" for commit_hash.
As a user of Bundler you have spent significant time looking at this message: Fetching source index for http://rubygems.org...
Regular spaces and non-breaking spaces are hard to distinguish for a human. Instead of using the HTML entity...
Given this class: class Foo class Bar end end If you want to clean up this code with the modularity...
Use this scope: class Stick named_scope :shuffled, lambda { last_record = last { :conditions => [ 'id >= ?', rand(last_record.id) ] } if last_record }
Terminus is a Capybara driver where most of the driver functions are implemented in client-side JavaScript. It lets you...
CONCAT('foo', 'bar', NULL) = NULL the NULL always wins in MySQL. If you would rather treat NULL as...
Sometimes you inherit a non Rails or non Rack based web app such as PHP, Perl, Java / JEE, etc. I...
If a controller action responds to other formats than HTML (XML, PDF, Excel, JSON, ...), you can reach that code in...
After switching to Rails 3 you may get a LoadError with the following message when trying to use your application...
You will need to upgrade to RSpec >= 2 and rspec-rails >= 2 for Rails 3. Here are some hints to...
Be careful when using params.merge as params is a HashWithIndifferentAccess. Why? Usually this should not be an issue but it...
Be careful when memoizing a method that returns a scope, e.g.: def variants scoped(:conditions => { :name => name }) end memoize :variants...
When using form_for you can give the form's target URL either as a string or an array:
The ancestry gem allows you to easily use tree structures in your Rails application. There is one somewhat unobvious pitfall...
If you did file operations inside a shell or for example using Nautilus, it can take quite a while until...
Sometimes the order in which strings appear on a page matters to you. Spreewald gives you steps like these:
If you want to see how long your database queries actually take, you need to disable MySQL's query cache...
If you get an error message like that you are missing the Aspell files a specific language:
Capybara's has_css? matcher has a couple of options you might find useful. Check that a selector appears a...
Hooks lets you define hooks declaratively in your ruby class. You can add callbacks to your hook, which will be...
Even when you're using bundler, it might be significant in which order your gems are listed in your Gemfile...
This post will describe how I stumbled upon a code path in the Linux kernel which allows external programs to...