Partials always define a local variable with the same name as themselves. E.g. when you are in _recent_users.html.erb, a local...
If you want to convert a README.rdoc file to HTML, say this from a shell: rdoc README.rdoc
ActiveRecord gives you the :include option to load records and their associations in a fixed number of queries. This is...
It is common in Rails 3.0 applications that you want to provide default views for a group of controllers. Let...
I prefer using Opera's "User mode" to toggle an outlining of HTML elements quickly. This helps greatly when you...
Within an event handler, there are multiple methods to cancel event propagation, each with different semantics. event.preventDefault() Only prevents the...
Back when Steak was first released, Capybara didn’t have any of the nice RSpec helpers it does now. A...
The information in this card is only relevant for Rails 2.3-era apps. This note gives a quick introduction into...
Liquid Canvas is a JavaScript library which allows you to draw inside an HTML canvas element with an easy yet...
Specify these gem versions in your Gemfile: gem 'cucumber', '~> 1.3.0' gem 'cucumber-rails', '= 0.3.2' # max version for Rails 2
When you click a link or a press a button on a Selenium-controlled browser, the call will return control...
"Wallaby" is the codename for an experimental technology that converts the artwork and animation contained in Adobe® Flash® Professional (FLA...
If you have content inside a page that is hidden by CSS, the following will work with Selenium, but not...
If you use a form (or form fields) multiple times inside one view, Rails will generate the same id attributes...
Flash movies (.swf files) can talk with Javascript code embedded in the same HTML page. There are two ways to...
Sometimes you want to run a command forever, e.g. to compile a haml to html file on the console. Use...
Javascript that implements client-side hyphenation of HTML-Documents.
You know Firebug as a Firefox extension but there is also a "Lite" version which runs purely off JavaScript.
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...
You cannot use Array#join on an array of strings where some strings are html_safe and others are not...
If you want your application to display properly on iPad, iPhone or Android there are two things to do:
The following Sass will do the trick: button, input[type="reset"], input[type="button"], input[type="submit"], input[type="file...
Our collection of the most useful Cucumber steps, Spreewald, now supports exact matching of form fields and lets you use...