提交 b6f82637 编写于 作者: J José Valim

Added a couple more options to app generator.

上级 615527dc
......@@ -17,4 +17,4 @@ require 'rails_generator/scripts/generate'
Rails::Generator::Base.use_application_sources!
Rails::Generator::Scripts::Generate.new.run(ARGV, :generator => 'app')
Dir.chdir(app_path) { `rake rails:freeze:gems`; puts "froze" } if freeze
\ No newline at end of file
Dir.chdir(app_path) { `rake rails:freeze:gems`; puts "froze" } if freeze
......@@ -37,6 +37,13 @@ module Rails::Generators
class_option :no_prototype, :type => :boolean, :aliases => "-P", :default => false,
:desc => "Do not generate Prototype files"
# Add Rails options
class_option :version, :type => :boolean, :aliases => "-v", :group => :rails,
:desc => "Show Rails version number and quit"
class_option :help, :type => :boolean, :aliases => "-h", :group => :rails,
:desc => "Show this help message and quit"
def create_root
self.root = File.expand_path(app_path, root)
empty_directory '.'
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册