To change a commit message of the most recent (unpushed) commit, you can simply use git commit --amend -m 'new...
Plugins (and gems) are typically tested using a complete sample rails application that lives in the spec folder of the...
This step tests whether a given select option comes preselected in the HTML. There is another step to test that...
This collection of Sass mixins enables cross-browser styling (including IE with CSS3PIE) with less lines of code.
You should never transmit sensitive data without encryption. Being logged in somewhere constitutes transmitting sensitive data. For Pivotal Tracker:
Added utility methods for the Prototype Javascript framework.
This is non-trivial because you need to fake event objects and require different code for different browsers. Luckily, there...
When using an odd value for line-height in CSS the result will vary across all major browsers.\
When you use will_paginage to paginate a scope, and you want to obtain the total number of records matched...
This document describes an agreement between web servers and search engine crawlers that allows for dynamically created content to be...
Fixes all Flash elements on a page so that they heed DOM stacking order
There is a problem with AJAX response handling for Rails 3 remote links and forms in Internet Explorer. This problem...
This will stash all modifications that you did not git add: git stash -k Note that newly created (and non...
You most likely never want to do this. But if you do: Model.update_all({:id => new_id}, {:id => old_id...
To only run the next two migrations: rake db:migrate STEP=2 To revert the previous two migrations:
The following initializer provides an :alias => "my_route_name" option to restful routes in your route.rb. This simply makes the...
If you need to revert only parts of one or several commits the following workflow can help:
git diff commit_hash -- path/to/file Provide any commit hashes or branch names like "master" for commit_hash.
To install webmock 1.5.0: sudo gem install webmock --version "=1.5.0" or sudo gem install webmock -v "=1.5.0"
As a user of Bundler you have spent significant time looking at this message: Fetching source index for http://rubygems.org...
Regular spaces and non-breaking spaces are hard to distinguish for a human. Instead of using the HTML entity...
Given this class: class Foo class Bar end end If you want to clean up this code with the modularity...
This is a bash script for those of you who need to install all gems for all projects (e.g. to...
Use this scope: class Stick named_scope :shuffled, lambda { last_record = last { :conditions => [ 'id >= ?', rand(last_record.id) ] } if last_record }