When you need to add a event listener to hundreds of elements, this might slow down the browser. An alternative...

Don't use should validate_format_of(...) because that matcher works in weird ways. Use the allow_value matcher instead...

Use this if you want to show or hide part of a form if certain options are selected or boxes...

regular-expressions.info

You can write regular expressions some different ways, e.g. /regex/ and %r{regex}. For examples, look here. Remember that it...

github.com

jamesgolick / resource_controller at Github module ResourceController module Actions def index load_collection before :index response_for :index end

Capybara does not play nice with sites that have some actions protected by SSL, some not. A popular way to...

github.com

Our awesome collection of rspec helpers (formerly known as "spec_candy.rb") is now available as a gem. It works, it is...

github.com

home_run is an implementation of ruby’s Date/DateTime classes in C, with much better performance (20-200x) than...

tinyMCE.activeEditor.getContent()

prototypejs.org

For example, to send a form and populate a preview div with the response. $('content_form').request({ parameters: { 'preview': "1...

github.com

Ancestry is a gem/plugin that allows the records of a Ruby on Rails ActiveRecord model to be organised as a...

In Webkit you can use the HTML5-attribute autofocus: = form.text_field :title, :autofocus => 'autofocus' Here is a jQuery fallback for...

Most of these will not work in newer projects because these use the Capybara/Rack::Test combo in lieu of Webrat...

Until May 2011 our gems have been created with Jeweler, which is a helper library to package code into a...

With defaults, RCov doesn't work the way you how you would like it to. To create a nice test...

github.com

We built cucumber_spinner to have a progress bar for Cucumber features, which also outputs failing scenarios as soon as...

To parse XML-documents, I recommend the gem nokogiri. A few hints: xml = Nokogiri::XML(" foo bar ") parses an xml...

See the lemonade descriptions. Unfortunately, the gem has a few problems: it does not work with Sass2...

install apache sudo apt-get install ruby1.8-dev sudo gem install passenger sudo passenger-install-apache2-module follow the instructions

makandra dev

This is about converting Haml to ERB and not the other way round which you probably want! This process can...

.error, .information, .warning { font-weight: bold; } .notice { color: #11bb00; } .error { color: #F53A31; } .information { color: #557; } .warning { color: #d07d2d; }

When you need to patch an existing gem, one way is to "vendor" the gem by copying it into the...

sudo gem install zip git clone git://github.com/rtomayko/date-performance.git cd date-performance rake package:build cd dist sudo gem install...

web.archive.org

This note shows how to merge an ugly feature branch with multiple dirty WIP commits back into the master as...