Given the problem you have a new column postion and that column should be updated for all existing rows with...
Generally for nested forms, a blank form is placed below all other existing object forms. If you would like to...
Defining a custom to_json method for your classes can be useful. Do it properly or you will "randomly" get...
grep -r doesn't work on Solaris. You can only grep on files in the current directory. A workaround is...
When you require the Ruby debugger to be available from your Rails console (e.g. you want to inspect a method...
Using git rebase can be painful but luckily you can resort to cheating with git reset and committing anew.
When adding a new field to your model's database table, don't set any defaults in the database.
Single step and slow motion for Cucumber scenarios can come in handy, especially in @javascript scenarios. # features/support/examiners.rb AfterStep('@slow_motion...
In order to open a MySQL shell without the need to enter user and password, you can say the following...
Since version 11.10 Opera provides support for linear gradients using -o-linear-gradient. The syntax is pretty similar to Mozilla...
In case you have sensitive data within your RDS instance, you want to use encrypted connections between your application and...
Recently, we had an interesting lunch-break with the rails 3.1. asset-pipeline in production mode. Daniel Zahn made a...
The colors in Rails log files are helpful when watching them but, since they are ANSI color codes like ^[[4...
Never use raise_error without specifying the Error you expect. expect { do_a_lot_of_complicated_stuff }.to raise_error...
You can use the step definition below to say this: Then the "Last name" field should have an error
When cucumber encounters a failing step in a @javascript feature, the selenium browser window instantly closes. Sometimes you do not...
The technique described in this card has an important caveat: The result of GROUP_CONCAT is truncated to the maximum...
You can use heredoc to avoid endlessly long lines of code that nobody can read. Heredoc strings preserve linebreaks and...
There is a new card about how to do this with the new AWS Command Line Interface
If Rails or Rake are complaining about a missing gem that is listed in your Gemfile.lock and the listed version...
Sometimes you want to use a vanilla Ruby method like a block. You can use Object#method to obtain a...
You can use this shell command: uniq -u input.txt output.txt
This article explains why some regular expressions take years to match against certain strings. A common culprit are nested repetition...
Sometimes you may need to figure out what branches exist on a remote repository so you can pull them down...