diff options
Diffstat (limited to 'activerecord')
4 files changed, 10 insertions, 10 deletions
diff --git a/activerecord/lib/rails/generators/active_record.rb b/activerecord/lib/rails/generators/active_record.rb index 297cd094c2..c8aa37f275 100644 --- a/activerecord/lib/rails/generators/active_record.rb +++ b/activerecord/lib/rails/generators/active_record.rb @@ -4,8 +4,8 @@ require 'rails/generators/active_model' require 'active_record' module ActiveRecord - module Generators - class Base < Rails::Generators::NamedBase #:nodoc: + module Generators # :nodoc: + class Base < Rails::Generators::NamedBase # :nodoc: include Rails::Generators::Migration # Set the current directory as base for the inherited generators. @@ -14,7 +14,7 @@ module ActiveRecord end # Implement the required interface for Rails::Generators::Migration. - def self.next_migration_number(dirname) #:nodoc: + def self.next_migration_number(dirname) next_migration_number = current_migration_number(dirname) + 1 ActiveRecord::Migration.next_migration_number(next_migration_number) end diff --git a/activerecord/lib/rails/generators/active_record/migration/migration_generator.rb b/activerecord/lib/rails/generators/active_record/migration/migration_generator.rb index a3c274d9b9..5f1dbe36d6 100644 --- a/activerecord/lib/rails/generators/active_record/migration/migration_generator.rb +++ b/activerecord/lib/rails/generators/active_record/migration/migration_generator.rb @@ -1,8 +1,8 @@ require 'rails/generators/active_record' module ActiveRecord - module Generators - class MigrationGenerator < Base + module Generators # :nodoc: + class MigrationGenerator < Base # :nodoc: argument :attributes, :type => :array, :default => [], :banner => "field[:type][:index] field[:type][:index]" def create_migration_file @@ -42,7 +42,7 @@ module ActiveRecord attribute.name.singularize.foreign_key end.to_sym end - + private def validate_file_name! diff --git a/activerecord/lib/rails/generators/active_record/model/model_generator.rb b/activerecord/lib/rails/generators/active_record/model/model_generator.rb index 8e6ef20285..5f36181694 100644 --- a/activerecord/lib/rails/generators/active_record/model/model_generator.rb +++ b/activerecord/lib/rails/generators/active_record/model/model_generator.rb @@ -1,8 +1,8 @@ require 'rails/generators/active_record' module ActiveRecord - module Generators - class ModelGenerator < Base + module Generators # :nodoc: + class ModelGenerator < Base # :nodoc: argument :attributes, :type => :array, :default => [], :banner => "field[:type][:index] field[:type][:index]" check_class_collision diff --git a/activerecord/lib/rails/generators/active_record/observer/observer_generator.rb b/activerecord/lib/rails/generators/active_record/observer/observer_generator.rb index c1c0e3f25b..e7445d03a2 100644 --- a/activerecord/lib/rails/generators/active_record/observer/observer_generator.rb +++ b/activerecord/lib/rails/generators/active_record/observer/observer_generator.rb @@ -1,8 +1,8 @@ require 'rails/generators/active_record' module ActiveRecord - module Generators - class ObserverGenerator < Base + module Generators # :nodoc: + class ObserverGenerator < Base # :nodoc: check_class_collision :suffix => "Observer" def create_observer_file |