Custom matchers are a useful RSpec feature which you can use to DRY up repetitive expectations in your specs. Unfortunately...

Shared example groups are a useful RSpec feature. Unfortunately the default directory structure generated by rspec-rails has no obvious...

In Rails 5 you can say: ApplicationController.render( :template => 'users/index', :layout => 'my_layout', :assigns => { users: @users } ) If a Request Environment is...

web.archive.org

Capistrano 2 brings the shell command which allows you to run commands on your deployment targets. There is also invoke...

Simply give the select helper an option :disabled, passing either a single value or an array. You need to specify...

makandracards.com

So you're hunting down a regression (or just a bug) and want to use git bisect to find out...

Consul 0.9 comes with many new features to optimize powers that only check access to a given record. e.g. Power.current.post...

jimneath.org

The linked page lists and explains global Ruby "dollar" variables, such as: $: (load path) $* (ARGV) $? (Last exit status) $$ (PID)

The cookies object in your controllers and views is a ActionController::CookieJar and even though that class inherits from Hash...

tldp.org

$RANDOM on bash returns a random integer between 0 and 32767. echo $RANDOM 9816 echo $RANDOM 30922

I recently encountered the error above when I was running selenium tests. Thanks to a post on stackoverflow I found...

makandra dev

Using CSS sprites for background images is a technique for optimizing page load time by combining smaller images into a...

theprogrammingbutler.com

Similar to closing an opened browser window, spreewald now supports the I switch to the new browser tab step.

makandra dev

Next time you have to do more than trivial CSS changes on a project, you probably want to have live...

Set the hash to a dummy hash which doesn't hit any id at your page, for example: window.location.hash = "_";

1. Saving files to a directory that is not shared between deploys or servers If you save your uploads to...

This card shows how to upgrade a Rails 2 application from Rails 2.3.8 through every single patch level up to...

Active Record's select method allows you to make use of the power of MySQL select statements. On the one...

linuxsa.org.au

Here is a good explanation for zombie processes. Quote: If you have zombie processes it means those zombies have not...

Merge requests are often rejected for similar reasons. To avoid this, before you send a merge request, please confirm that...

The Ruby on Rails security list archive can be found here: http://groups.google.com/group/rubyonrails-security You can subscribe to this mailing...

Back in the old days, we couldn't do something like that: .foo { position: absolute; bottom: 0; /* This was bad...

Capybara drivers will usually delete all cookies after each scenario. If you need to lose cookie data in the middle...

In order to clone a git repository including all branches and tags you need to use two parameters when cloning...