diff options
author | Vijay Dev <vijaydev.cse@gmail.com> | 2012-10-21 18:49:19 +0530 |
---|---|---|
committer | Vijay Dev <vijaydev.cse@gmail.com> | 2012-10-21 18:49:19 +0530 |
commit | f938019da210ea2bfccabdf61424852e8006c741 (patch) | |
tree | 7cd316340f230efe5b2d55b7df5a85232e5d5db5 /activerecord/lib/rails/generators | |
parent | cec66e589f69a10ab9d6e4b62dd34ff09e5dc01b (diff) | |
parent | e84281398e79e09b637c888860fcefd6f82bf968 (diff) | |
download | rails-f938019da210ea2bfccabdf61424852e8006c741.tar.gz rails-f938019da210ea2bfccabdf61424852e8006c741.tar.bz2 rails-f938019da210ea2bfccabdf61424852e8006c741.zip |
Merge branch 'master' of github.com:lifo/docrails
Conflicts:
activesupport/lib/active_support/core_ext/hash/slice.rb
guides/source/active_support_core_extensions.md
Diffstat (limited to 'activerecord/lib/rails/generators')
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 |