This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # 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" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 |
NewerOlder