If you want to grow a Ruby Array, you might find out about #fill but it is not really what...

edgeapi.rubyonrails.org

Starting from Rails 4.0, you can use a special form options helper called #collection_check_boxes. It behaves similar to...

Web applications can be used by multiple users at the same time. A typical application server like Passenger has multiple...

makandra dev
relishapp.com

RSpec 3 has verifying doubles. This breed of mock objects check that any methods being stubbed are present on an...

If you want to sort values from an enumerable into two arrays based on whether they match a certain criteria...

To achieve this goal you have to setup the session store like the following example: MyApp::Application.config.session_store( :cookie_store...

When you are using the #selector_for helper in Cucumber steps, as e.g. Spreewald does, the following snippet will save...

Enumerable#count can do three things. With no argument provided, it returns the number of items. With an argument, it...

Array#flatten by default flattens an array recursively. To only flatten the array for e.g. one level, it takes an...

guides.rubyonrails.org

When running migrations with rake db:migrate, there's the STEP and VERSION parameters that you can pass to nearly...

coffeescript.org

The Javascript in operator does what Hash#has_key? does in Ruby: Return whether an object has a property.

This will list all branches matching your query as input options for git checkout greckout ar 1) ar/cache-api-keys-1098...

Add gem 'database_cleaner' to your Gemfile. Then: Cucumber & Rails 3+ # features/support/database_cleaner.rb DatabaseCleaner.clean_with(:deletion) # clean once, now DatabaseCleaner.strategy = :transaction...

In the tradition of our PostgreSQL cheat sheet for MySQL lamers, here is a cheat sheet for Jasmine when you...

developer.mozilla.org

You can do so much more than console.log(...)! See the attached link for a great breakdown of what the developer...

This step will pass if the specified select is sorted. Then /^the "(.*?)" select should be sorted$/ do |label, negate|

makandracards.com

Chances are you're seeing the warning repeated a lot of times, maybe thousands of times. Here's how to...

If you want a class-like construct in JavaScript, you can use the module pattern below. The module pattern gives...

When using git diff, you might encounter weird characters where umlauts (or any other UTF-8) characters should be. It...

Option 0: Download from the official page (preferred) Open https://googlechromelabs.github.io/chrome-for-testing/ In Section "Stable" > chromedriver / linux64 > Download ZIP from...

One of the many useful features of TextMate is autocompletion of words. If I were in TextMate right now, I...

A great two-part article about various hacks you can use to create great-looking screen designers when you're...

Rails migrations allow you to use a change method whose calls are automatically inverted for the down path. However, if...

Upgrading from Ruby 1.8.7 to 2.1.2 took me an hour for a medium-sized application. It involved hardly any changes...