Skip to content

Instantly share code, notes, and snippets.

@gongo
Created November 27, 2009 15:18
Show Gist options
  • Save gongo/244056 to your computer and use it in GitHub Desktop.
Save gongo/244056 to your computer and use it in GitHub Desktop.
Railroad 0.5.0 で Rails のバージョンアップで、application.rb が無くなった(application_controller.rb になった)用のパッチ
*** controllers_diagram.rb.orig 2009-11-28 00:10:47.000000000 +0900
--- controllers_diagram.rb 2009-11-28 00:13:13.000000000 +0900
***************
*** 20,26 ****
STDERR.print "Generating controllers diagram\n" if @options.verbose
files = Dir.glob("app/controllers/**/*_controller.rb") - @options.exclude
- files << 'app/controllers/application.rb'
files.each do |f|
class_name = extract_class_name(f)
# ApplicationController's file is 'application.rb'
--- 20,25 ----
***************
*** 36,42 ****
begin
disable_stdout
# ApplicationController must be loaded first
- require "app/controllers/application.rb"
files = Dir.glob("app/controllers/**/*_controller.rb") - @options.exclude
files.each {|c| require c }
enable_stdout
--- 35,40 ----
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment