I have no idea how it's supposed to work (or why the don't have a print CSS), but...
Though Internet Explorer 9 supports the box-shadow CSS property there is a nasty bug which sometimes prevents it from...
When you print out a HTML pages, all raster images (like PNGs) will appear aliased. This is because a printer...
Although it's tempting flirt with detecting mobile/touch devices with CSS media queries or Javascript feature detection alone, this approach...
Scenario outlines allow us to more concisely express repetitive examples through the use of a template with placeholders.
When you use one line Ruby comments in ERB templates you should never do this (notice the whitespace in front...
Since Firefox 8 it is possible to define custom context menus (right clicking) with HTML markup.
If you would like to use language specific layout (e.g. background-images) in your applications stylesheets you can achieve this...
In order to prevent the browser from asking whether to remember the password, give a form an autocomplete attribute with...
By default, Rails views escape HTML in any strings you insert. If you want to insert HTML verbatim, you need...
Clearfix is a hack to clear floating elements without additional HTML markup. If you only need to support IE8 and...
You can use heredoc to avoid endlessly long lines of code that nobody can read. Heredoc strings preserve linebreaks and...
Simple: Tell the application controller how to handle exceptions, here a RecordNotFound error. Do this with the following line: # application_controller.rb...
Ever wondered how Rails talks to itself in a Cucumber feature? In Rails 3 you can do it like this...
Do you have page caching enabled for the development environment and there are cached pages lying around in public/?
Consider this HTML: Even though the surrounding container defines a line-height, which vertically centers its inline elements, the check...
Detecting if a Javascript is running under Selenium WebDriver is super-painful. It's much easier to detect the current...
The Capybara API is somewhat hard for parse for a list of methods you can call on a Capybara node...
tl;dr: Always have your attachment path start with :rails_root/storage/#{Rails.env}#{ENV['RAILS_TEST_NUMBER']}/. The directory where you...
When your Cucumber feature needs to browse the page HTML, and you are not sure how to express your query...
When you need to use diff in either some Ruby code or your Rails app, use the differ gem.
Under the same origin policy, a web page served from server1.example.com cannot normally connect to or communicate with a server...
I think this pattern is really useful not just for upgrading suites from Webrat, but really anywhere you have an...
In Rails 2, you could use link_to_remote...
...:update => 'id' to automatically replace the content of $('#id').