linux.die.net

You can convert git commits into patch files. Those can be used to apply to a different repository [1] or...

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

ckeditor.com

Using the jQuery adapter breaks the built-in save function of CKEditor. Phenomenon: The page is submitted correctly, but the...

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

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

Generally for nested forms, a blank form is placed below all other existing object forms. If you would like to...

makandra dev
stackoverflow.com

Using git rebase can be painful but luckily you can resort to cheating with git reset and committing anew.

commandlinefu.com

The colors in Rails log files are helpful when watching them but, since they are ANSI color codes like ^[[4...

makandra dev

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

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

awsdocs.s3.amazonaws.com

There is a new card about how to do this with the new AWS Command Line Interface

makandra dev

cURL makes a web request and shows you the response body. You can redirect the response body to /dev/null just...

Consider you have a website vhost listening to www.example.com, redirecting all incoming requests that do not talk about the configured...

If you get an error "Adress already in use" with autossh check with lsof or netstat if something already listen...

Observed on Rails 2.3 and machinist 1.0.6 Like the title says, when you define the method empty? like in the...

There is a bug in Rails 3's dbconsole script, which makes the following command open a database console for...

While it might seem trivial to implement an invoice that sums up items and shows net, gross and vat totals...

You've been there: A form cannot be submitted, but you don't see a validation error because the field...