Note: This technique is confusing and slows down your test suite. Copy the attached code to features/support. This gets you...

stackoverflow.com

TL;DR: Variables not declared using var are stored outside the current scope, most likely in the global scope (which...

When a controller action redirects to an external URL (like http://somehost.com/some/path) you will find that this is hard...

The following code doesn't work like expected: page.find(css_selector).find(other_css_selector) The second .find will search...

opensoul.org

Great presentation about writing Javascript like you write everything else: Well-structured and tested. JavaScript is no longer a toy...

chartjs.org

Chart.js seems to be a good alternative to Google's Chart API and other commercial chart drawing libraries.

ariejan.net

Rails understands a :limit options when you create columns in a migration. Its meaning depends on the column type, and...

JavaScript has no built-in functions to compare two objects or arrays for equality of their contained values.

If you open a pop-up window [1] in your Selenium tests and you want to close it, you can...

makandra dev

JavaScripts and CSS should be minified for production use. In Rails 3.1+ the asset pipeline will take care of this...

If you need to capture signatures on an IPad or similar device, you can use Thomas J Bradley's excellent...

kushagragour.in

A tooltip library that does not use Javascript. Works in IE9+. This library (or the technique used by it) could...

Spreewald now comes with a step that tests if a form field is visible: Then the "Due date" field should...

developers.google.com

The attached article outlines considerations when choosing client-side vs. server-side implementations of the Google Geocoding APIs (geocoder, directions...

If you get a message like this: Jan 21 13:42:38 foobar syslogd: /var/log/authlog : no such file or directory...

So you want to find out how many horizontal pixels you have available on a mobile device. This is super...

kernel.org

If you say git stash, your stashed changes will be identified with an automatically generated message: $ git stash

Every time you call $(...) jQuery will create a new object. Because of this, comparing two jQuery collections with == will never...

makandra dev
github.com

Tracekit is a JavaScript library that automatically normalizes and exposes stack traces for unhandled exceptions across the 5 major browsers...

When you have a Pull Request on GitHub that includes commits from another Pull Request, you will still see them...

When you are using git rebase and are currently editing a commit (due to a conflict, for example), you may...

creativecouple.github.com

jquery-timing is a very useful jquery plugin that helps to remove lots of nested anonymous functions. It's API...

The basic idea is pretty simple: an element's height is accessible via the offsetHeight property, its drawn height via...

stackoverflow.com

This works in all relevant browsers: document.activeElement You can use this in your Selenium steps, for example, to assert that...