Ruby: How to camelize a string with a lower-case first letter

ActiveSupport String#camelize(:lower) turns snake_case into lowerCamelCase for JavaScript-style naming without custom string handling.

Capybara: How to find a hidden field by its label

Hidden form inputs are ignored by default in Capybara, causing find_field to fail unless type: :hidden is specified. This helps when tests must wait for JavaScript widgets to populate a field value.

Draggabilly

JavaScript library for drag-and-drop interactions with more control than native HTML5 support, plus touch and multi-touch behavior for modern browsers.

Debugging Google Analytics

Analytics tracking can be hard to verify in the browser; a Chrome extension swaps in a debug version and prints tracking details to the JavaScript console.

HTML: Making browsers wrap long words

Long words can overflow layouts when browsers wrap only at word boundaries. CSS hyphenation, soft hyphens, <wbr>, and overflow-wrap offer different control levels.

Javascript: Wait until an image has finished loading

Loading images asynchronously can race with rendering or size checks; ImageLoader.load() returns a promise that resolves with an HTMLImageElement once the image is ready.

Less.js Will Obsolete CSS

Less.js is a JavaScript implementation of LESS that’s run by your web browser. As any JavaScript, you include a link to the script in your HTML, and…that’s that. LESS is now going to process LESS code so instead of including a link to a CSS file, you’ll include a link directly to your LESS code. That’s right, no CSS pre-processing, LESS will handle it live.

Guide to localizing a Rails application

Rails app localization affects text, URLs, formats, images, caching, and time zones; estimating effort means checking each layer for language-sensitive behavior.

Chart.js - a promising JavaScript charting library with MIT-license

Lightweight canvas-based charting for web apps with high configurability and broad browser support. A permissive MIT-licensed alternative to Google Charts and commercial libraries.

Unpoly: Showing the better_errors page when Rails raises an error

AJAX errors in Unpoly can hide the full better_errors page in Rails development. A fallback full-page reload restores the interactive error view and CSS.

Preloading images with CSS

Preloading hover or background images avoids visible delays when a new image is needed. Pure CSS can trigger loading without JavaScript.

makandra/capybara-lockstep

Flaky end-to-end tests often fail because Capybara outpaces client-side JavaScript and AJAX; synchronizing commands with browser activity makes full-stack integration suites more stable.

Thoughtbot's experiences with headless Javascript testing

Selenium has been the siren song that continually calls out to us. Unfortunately, in practice we’ve been unable to get Selenium to run reliably for real applications, on both developers machines and on the continuous integration server. This failure with Selenium has caused us to search for alternative solutions

jspdf - Project Hosting on Google Code

jsPDF is an open-source library for generating PDF documents using nothing but Javascript. You can use it in a Firefox extension, in Server Side Javascript and with Data URIs in some browsers.

Underscore.js

Underscore is a utility-belt library for JavaScript that provides a lot of the functional programming support that you would expect in Prototype.js (or Ruby), but without extending any of the built-in JavaScript objects. It's the tie to go along with jQuery's tux.

Datejs - An open-source JavaScript Date Library

Comprehensive, yet simple, stealthy and fast. Datejs has passed all trials and is ready to strike. Datejs doesn’t just parse strings, it slices them cleanly in two.

jbarnette's johnson at master - GitHub

Johnson wraps JavaScript in a loving Ruby embrace. It embeds the Mozilla SpiderMonkey JavaScript runtime as a C extension.

Always disable autocomplete for date pickers

Browser autofill can cover date picker popups and make them unusable. Disabling autocomplete on the trigger input keeps the calendar visible while preserving fallback behavior.

JavaScript: Don't throw synchronous exceptions from functions that return a Promise

Promise-returning functions are hard to use when they sometimes throw synchronously; returning a rejected promise keeps failure handling consistent.

JavaScript dependency management and concatenation: Sprockets

Sprockets is a Ruby library that preprocesses and concatenates JavaScript source files. It takes any number of source files and preprocesses them line-by-line in order to build a single concatenation. Specially formatted lines act as directives to the Sprockets preprocessor, telling it to require the contents of another file or library first or to provide a set of asset files (such as images or stylesheets) to the document root.

JavaScript Garden

JavaScript Garden is a growing collection of documentation about the most quirky parts of the JavaScript programming language. It gives advice to avoid common mistakes, subtle bugs, as well as performance issues and bad practices that non-expert JavaScript programmers may encounter on their endeavours into the depths of the language.

JavaScript Garden does not aim to teach you JavaScript. Former knowledge of the language is strongly recommended in order to understand the topics covered in this guide