mirror of https://github.com/rails/rails
Generators load path now will be Ruby load path. If you want to use rspec:install generator, you need generators/rspec/install_generator in your load path.
This commit is contained in:
parent
e75ea47434
commit
9fffdc5cdb
|
@ -8,6 +8,14 @@ module ActiveRecord
|
|||
class Base < Rails::Generators::NamedBase #:nodoc:
|
||||
include Rails::Generators::Migration
|
||||
|
||||
def self.source_root
|
||||
@_ar_source_root ||= begin
|
||||
if base_name && generator_name
|
||||
File.expand_path(File.join(base_name, generator_name, 'templates'), File.dirname(__FILE__))
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
protected
|
||||
# Implement the required interface for Rails::Generators::Migration.
|
||||
#
|
|
@ -1,4 +1,4 @@
|
|||
require 'rails/generators/active_record'
|
||||
require 'generators/active_record'
|
||||
|
||||
module ActiveRecord
|
||||
module Generators
|
|
@ -1,4 +1,4 @@
|
|||
require 'rails/generators/active_record'
|
||||
require 'generators/active_record'
|
||||
|
||||
module ActiveRecord
|
||||
module Generators
|
|
@ -1,4 +1,4 @@
|
|||
require 'rails/generators/active_record'
|
||||
require 'generators/active_record'
|
||||
|
||||
module ActiveRecord
|
||||
module Generators
|
|
@ -1,4 +1,4 @@
|
|||
require 'rails/generators/active_record'
|
||||
require 'generators/active_record'
|
||||
|
||||
module ActiveRecord
|
||||
module Generators
|
|
@ -1,4 +1,4 @@
|
|||
require 'rails/generators/erb'
|
||||
require 'generators/erb'
|
||||
|
||||
module Erb
|
||||
module Generators
|
|
@ -1,4 +1,4 @@
|
|||
require 'rails/generators/erb'
|
||||
require 'generators/erb'
|
||||
|
||||
module Erb
|
||||
module Generators
|
|
@ -1,4 +1,4 @@
|
|||
require 'rails/generators/erb'
|
||||
require 'generators/erb'
|
||||
require 'rails/generators/resource_helpers'
|
||||
|
||||
module Erb
|
|
@ -5,7 +5,7 @@ require 'rails/version' unless defined?(Rails::VERSION)
|
|||
module Rails::Generators
|
||||
# We need to store the RAILS_DEV_PATH in a constant, otherwise the path
|
||||
# can change in Ruby 1.8.7 when we FileUtils.cd.
|
||||
RAILS_DEV_PATH = File.expand_path("../../../../../..", File.dirname(__FILE__))
|
||||
RAILS_DEV_PATH = File.expand_path("../../../../..", File.dirname(__FILE__))
|
||||
|
||||
class AppGenerator < Base
|
||||
DATABASES = %w( mysql oracle postgresql sqlite3 frontbase ibm_db )
|
||||
|
@ -35,7 +35,7 @@ module Rails::Generators
|
|||
:desc => "Skip Prototype files"
|
||||
|
||||
class_option :skip_git, :type => :boolean, :aliases => "-G", :default => false,
|
||||
:desc => "Skip Git ignores and keeps"
|
||||
:desc => "Skip Git ignores and keeps"
|
||||
|
||||
# Add bin/rails options
|
||||
class_option :version, :type => :boolean, :aliases => "-v", :group => :rails,
|
Before Width: | Height: | Size: 6.5 KiB After Width: | Height: | Size: 6.5 KiB |
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue