diff options
Diffstat (limited to 'railties/lib/rails_generator')
-rw-r--r-- | railties/lib/rails_generator/commands.rb | 2 | ||||
-rw-r--r-- | railties/lib/rails_generator/lookup.rb | 3 | ||||
-rw-r--r-- | railties/lib/rails_generator/options.rb | 3 |
3 files changed, 3 insertions, 5 deletions
diff --git a/railties/lib/rails_generator/commands.rb b/railties/lib/rails_generator/commands.rb index 8d0ac52b03..0d039838d3 100644 --- a/railties/lib/rails_generator/commands.rb +++ b/railties/lib/rails_generator/commands.rb @@ -16,7 +16,7 @@ module Rails # Even more convenient access to commands. Include Commands in # the generator Base class to get a nice #command instance method # which returns a delegate for the requested command. - def self.append_features(base) + def self.included(base) base.send(:define_method, :command) do |command| Commands.instance(command, self) end diff --git a/railties/lib/rails_generator/lookup.rb b/railties/lib/rails_generator/lookup.rb index 6ec6886485..06f1a9eb1b 100644 --- a/railties/lib/rails_generator/lookup.rb +++ b/railties/lib/rails_generator/lookup.rb @@ -48,8 +48,7 @@ module Rails # the generator and how to create it. A source is anything that # yields generators from #each. PathSource and GemSource are provided. module Lookup - def self.append_features(base) - super + def self.included(base) base.extend(ClassMethods) base.use_component_sources! end diff --git a/railties/lib/rails_generator/options.rb b/railties/lib/rails_generator/options.rb index fe80f8340d..8301f5c5b5 100644 --- a/railties/lib/rails_generator/options.rb +++ b/railties/lib/rails_generator/options.rb @@ -3,8 +3,7 @@ require 'optparse' module Rails module Generator module Options - def self.append_features(base) - super + def self.included(base) base.extend(ClassMethods) class << base if respond_to?(:inherited) |