When you try to remove a non-existing index using remove_index, the migration will incorrectly pass without an error...

getfirebug.com

You know Firebug as a Firefox extension but there is also a "Lite" version which runs purely off JavaScript.

babushka.me

The idea is this: you take a job that you'd rather not do manually, and describe it to babushka...

Note: Consider not doing this. Use form models or vanilla methods instead. The :conditions option for Rails associations cannot take...

This card describes a Cucumber step that lets you say: When I perform basic authentication as "username/password" and I visit...

Are you adding a "Then show me the page" and re-run Cucumber whenever there is a failing scenario? Don...

If you're on Ubuntu: sudo apt-get install ruby-dev On other platforms: Look for a package containing ruby...

This is for those who already own an SSL certificate (e.g. using it in the Apache HTTP Server) and need...

You cannot use Array#join on an array of strings where some strings are html_safe and others are not...

cssdiscussion.com

If you want your application to display properly on iPad, iPhone or Android there are two things to do:

Update: This trick probably isn't very useful anymore in Ruby 2.x. The Ruby GC has improved a lot...

The following Sass will do the trick: button, input[type="reset"], input[type="button"], input[type="submit"], input[type="file...

justinfrench.com

If you’re testing the behavior of deprecated code in your Ruby project, the warning messages littered throughout your spec...

When your site is mapped into the URL-space of another server using mod_proxy, ProxyPass and ProxyPassReverse, all requests...

Our collection of the most useful Cucumber steps, Spreewald, now supports exact matching of form fields and lets you use...

In RSpec 2 shared_examples_for can have parameters. You can simply hand over arguments from it_behaves...

While you can use Capybara matchers like have_css and have_content for expectations, they are not too helpful for...

Using this step definition you can check if any form field (text field, checkbox, etc) or button is disabled:

gurge.com

How to write to the db 27,000 times in 24 seconds instead of 9 minutes.

Use the htmlentities gem. Encoding works like this: require 'htmlentities' coder = HTMLEntities.new string = "<élan>" coder.encode(string) # => "&lt;élan&gt;"

Deadlocks only occur if two transactions in separate threads compete for the same rows in the database. They usually (but...

You can get YAML.load to instantiate any Ruby object by embedding the desired class name into the YAML code. E.g...

If your controller spec never reaches your controller code: Make sure you are signed in. Make sure you are actually...

When a has_many association basically serves to store a list of associated strings (tags, categories, ...), it can be convenient...