When you have objects in your database that hold latitude and longitude and you want to find others that are...

If you want to use Require group $GROUPNAME on your default Apache installation like this: Order allow,deny Allow from...

If you would like to use language specific layout (e.g. background-images) in your applications stylesheets you can achieve this...

You can group contacts using a mailing list in Thunderbird for easier access and less trouble when trying to find...

Instead of running all missing migrations on your test database with rake db:migrate RAILS_ENV=test you can also...

When using state_machine you sometimes need to know whether an object may execute a certain transition. Let's take...

In order to prevent the browser from asking whether to remember the password, give a form an autocomplete attribute with...

require 'open-uri' File.open('/target/path/to/downloaded.file', "wb") do |file| file.write open('http://example.com/your.file').read end Basic Authentication

After starting the Rails server in a freshly generated Rails 3.1 project you could see an error message such as...

Note: This applies specifically to MySQL. In PostgreSQL for example, this is not an issue. If you care about performance...

Look here for informations how you can show the MySQL default character set. At first you need the Amazon RDS...

By default, Rails views escape HTML in any strings you insert. If you want to insert HTML verbatim, you need...

danhixon.github.com

If you encounter the error message above when running cucumber, just execute... rm rerun.txt ...in the Rails directory.

RSpec 1 (Rails 2) With the most recent spec_candy.rb helpers you can say: User.stub_any_instance(:foo => :bar) user = User.new...

To show the collation of your tables you have to login to the MySQL console and execute SHOW TABLE STATUS...

To show the MySQL default character set you have to login to the MySQL console and execute SHOW VARIABLES LIKE...

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