First keep in mind that :dependent => :destroy hooks into before_destroy. So when you use other before_destroy callbacks the...
Using the jQuery adapter breaks the built-in save function of CKEditor. Phenomenon: The page is submitted correctly, but the...
You can use the attached script to do so: # ./log_parser.rb 2011-10-04 27 hits on /rss.xml 36 hits on /stylesheets/fonts/slkscr-webfont.woff 37 hits on /stylesheets/fonts/slkscrb-webfont.woff
Please note that you can break your system with this! This is not recommended. Sometimes the package repository has errors...
The buffer where text is put into when you double-click on text within X is called X selection.
You need to restart Eclipse.
The most common use case for Ruby's #collect is to call a method on each list element and collect...
In order to monitor a Rake task using God your Rake file must write a file with its process ID...
...check if the test travels in time like here: Given the date is 2017-10-20 When I sign in Then I should see "Welcome!" What happens here is that...
RSpec lets you define the arguments with which you expect a method to be invoked: subject.should_receive(:say).with('hello...
Capybara will match elements outside of a page's tag. For example, the step definitions below match nodes in a...
If you want to stop getting notified about new messages in a Skype chat (but not leave it altogether), you...
Looks simpler than inaction_mailer: gem install mailcatcher mailcatcher Setup Rails to send mails to 127.0.0.1:1025. Usually you want...
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...
Oniguruma is an advanced regular expression engine for Ruby. Install Oniguruma with binary dependencies like this: sudo apt-get install...
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...
Never use raise_error without specifying the Error you expect. expect { do_a_lot_of_complicated_stuff }.to raise_error...