If you modified git's history and the change was already pushed, you will usually get a ! [rejected] my-branch...

To change the commit message of the latest (unpushed, unmerged) commit, you can use git commit --amend

Lets say you need to make a change to a commit OLD_COMMIT, but this is not the most recent...

When a has_many association basically serves to store a list of associated strings (tags, categories, ...), it can be convenient...

Note that this card is very old. You might want to use ActiveType for your auto-coerced virtual attributes instead...

apidock.com

E.g. when you're using a tagging gem, you have seen virtual attributes that get and set a string array...

makandra dev

In order to go back one page in your Cucumber tests, you can use the following step definition for Capybara...

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...

github.com

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 you use will_paginage to paginate a scope, and you want to obtain the total number of records matched...

github.com

Fixes all Flash elements on a page so that they heed DOM stacking order

This will stash all modifications that you did not git add: git stash -k Note that newly created (and non...

For clarity and traceability, your commit messages should include the ID and title of the Pivotal Tracker story you're...

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.

Given this class: class Foo class Bar end end If you want to clean up this code with the modularity...

You will need to upgrade to RSpec >= 2 and rspec-rails >= 2 for Rails 3. Here are some hints to...

I prefer the application that I'm currently working on to be reachable at http://localhost/. So when I switch...

github.com

The ancestry gem allows you to easily use tree structures in your Rails application. There is one somewhat unobvious pitfall...

Sometimes the order in which strings appear on a page matters to you. Spreewald gives you steps like these:

When you do tags with acts-as-taggable-on and want to preload associated tags, you can do so with...

Note: We are talking about Machinist 1 here, Machinist 2 may have solved this or might require a different approach...