diff options
Diffstat (limited to 'railties/lib/rails/generators')
-rw-r--r-- | railties/lib/rails/generators/base.rb | 2 | ||||
-rw-r--r-- | railties/lib/rails/generators/migration.rb | 8 |
2 files changed, 4 insertions, 6 deletions
diff --git a/railties/lib/rails/generators/base.rb b/railties/lib/rails/generators/base.rb index f4b2bd1ae9..ec0659032f 100644 --- a/railties/lib/rails/generators/base.rb +++ b/railties/lib/rails/generators/base.rb @@ -1,4 +1,4 @@ -require 'thor' +require 'thor/group' require 'rails/generators/actions' module Rails diff --git a/railties/lib/rails/generators/migration.rb b/railties/lib/rails/generators/migration.rb index 8a8c899cc1..7975326c52 100644 --- a/railties/lib/rails/generators/migration.rb +++ b/railties/lib/rails/generators/migration.rb @@ -5,12 +5,10 @@ module Rails # just by implementing the next migration number method. # module Migration + attr_reader :migration_number, :migration_file_name, :migration_class_name + def self.included(base) #:nodoc: - base.class_eval do - extend ClassMethods - readers = lambda { attr_reader :migration_number, :migration_file_name, :migration_class_name } - respond_to?(:no_tasks) ? no_tasks(&readers) : readers.call - end + base.extend ClassMethods end module ClassMethods |