rubyinside.com

While 2.0 will include a number of syntax changes, new features and general improvements, mentioned below, it is anticipated to...

If you specify different ports, you can run multiple local webricks with rails server --port=300X at the same time...

First keep in mind that :dependent => :destroy hooks into before_destroy. So when you use other before_destroy callbacks the...

makandra dev

If you want to know the exact hits on your website (or whatever logfile you want) for a specific date...

The buffer where text is put into when you double-click on text within X is called X selection.

The most common use case for Ruby's #collect is to call a method on each list element and collect...

The Rails logger will store its content in a buffer and write it into the file system every 1000 lines...

makandra dev

In order to monitor a Rake task using God your Rake file must write a file with its process ID...

When your Cucumber feature seems to forget cookies / sessions when you run it with Selenium check if the test travels...

RSpec lets you define the arguments with which you expect a method to be invoked: subject.should_receive(:say).with('hello...

Calling #gsub on a string that was previously marked as #html_safe will lead to unexpected behavior. E. g. backreferences...

Capybara will match elements outside of a page's tag. For example, the step definitions below match nodes in a...

github.com

Looks simpler than inaction_mailer: gem install mailcatcher mailcatcher Setup Rails to send mails to 127.0.0.1:1025. Usually you want...

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...

makandra dev
stackoverflow.com

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.

web.archive.org

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...

makandra dev

Oniguruma is an advanced regular expression engine for Ruby. Install Oniguruma with binary dependencies like this: sudo apt-get install...

dev.opera.com

Since version 11.10 Opera provides support for linear gradients using -o-linear-gradient. The syntax is pretty similar to Mozilla...