Skip to content

Instantly share code, notes, and snippets.

# Critical default settings:
disable_system_gems
disable_rubygems
bundle_path ".gems/bundler_gems"
# List gems to bundle here:
gem "rails", "3.0.pre", :git => "git://github.com/rails/rails.git"
gem "arel", :git => "git://github.com/rails/arel.git"
gem "i18n"
gem "dm-appengine"
def custom_link_to(post)
"<a href='/blog/#{post.datetime.year}/#{post.datetime.month}/#{post.datetime.day}/#{post.slug}'>post.title</a>"
end
#routes
"/blog/:year", :controller => 'posts', :action => 'posts_for_year'
#controller actions
require 'find'
require 'fileutils'
dir = '/your_directory'
Find.find(dir) do |path|
if FileTest.directory?(path) && File.basename(path) == '.svn'
p 'rm directory:' + path
FileUtils.remove_dir(path)
else