Feeds:
Posts
Comments

Archive for July, 2008

ActiveRecord.maximum

ActiveRecord has a nice little calculation helper method called maximum that can be used to find the maximum value for a column in the database. If you’ve added the ability to sort data, this comes in handy when you want to insert a new record at the end. However, if you are creating [...]

Read Full Post »

Generate Rails project for prior version

In the event you have multiple versions of the Rails gem and want to generate an older version, you can do the following:
rails _2.0.2_ myapp
This will create a new myapp directory with Rails version 2.0.2.

Read Full Post »

Git commands

A collection of git commands from various git related posts:
Handling a pull request:
# go to your project directory first
# add account/project
git remote add <account> git://github.com/<account>/<project>.git

# create a new branch
git checkout -b <account>/<branch>

# push new branch to remote repo
# ** checkout new branch first. must be ‘on’ new branch
git push origin <new_branch_name>:refs/heads/<new_branch_name>

# information
git show <branch_name> [...]

Read Full Post »