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

makandra dev

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

makandra dev
github.com

When you need to use diff in either some Ruby code or your Rails app, use the differ gem.

en.wikipedia.org

Under the same origin policy, a web page served from server1.example.com cannot normally connect to or communicate with a server...

robots.thoughtbot.com

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

makandra dev

Every time you open a directory containing images, Windows creates those pesky Thumbs.db files for a minor speed-up and...

This snippet makes links that refer to an anchor (like "...

...") scroll softly to it.\ In this example we only do...

schema.org

If you would like to enrich your website with semantic markup like contact data, places or events you should have...

Update: Staticmatic will not be further developed. They suggest to switch to middleman. If you need to make a static...

makandra dev

This card shows you how to center a float horizontally in CSS. Also: find out what techniques are available for...

Internet Explorer 5+ is aware of conditional comments that let you target HTML for selected versions of IE. For example...

Install Ubuntu Server Download an image from this site Select File > New… to and follow the instructions, choose the .iso...

makandra dev

If you want to play music or sounds from a browser, your choice is to use either Flash or the...

Partials always define a local variable with the same name as themselves. E.g. when you are in _recent_users.html.erb, a local...

makandra dev

If you want to convert a README.rdoc file to HTML, say this from a shell: rdoc README.rdoc

blog.plataformatec.com.br

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

makandra dev

The information in this card is only relevant for Rails 2.3-era apps. This note gives a quick introduction into...

makandra dev
ruzee.com

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