diff options
author | José Valim <jose.valim@gmail.com> | 2009-07-21 11:28:54 +0200 |
---|---|---|
committer | José Valim <jose.valim@gmail.com> | 2009-07-21 11:28:54 +0200 |
commit | c90419d4f4a77e538707f67ea2ab22acdaa92d46 (patch) | |
tree | 3da7de318eadd4220e98086202d97ff6661f2c34 | |
parent | d6a590a7107eabd9c3ab067c60bef904da62f174 (diff) | |
download | rails-c90419d4f4a77e538707f67ea2ab22acdaa92d46.tar.gz rails-c90419d4f4a77e538707f67ea2ab22acdaa92d46.tar.bz2 rails-c90419d4f4a77e538707f67ea2ab22acdaa92d46.zip |
Update db:sessions:create to use the proper generator.
-rw-r--r-- | railties/lib/generators/rails/session_migration/session_migration_generator.rb | 2 | ||||
-rw-r--r-- | railties/lib/tasks/databases.rake | 6 | ||||
-rw-r--r-- | railties/lib/tasks/documentation.rake | 2 |
3 files changed, 5 insertions, 5 deletions
diff --git a/railties/lib/generators/rails/session_migration/session_migration_generator.rb b/railties/lib/generators/rails/session_migration/session_migration_generator.rb index 8f05d7b9c7..258cc5b4a0 100644 --- a/railties/lib/generators/rails/session_migration/session_migration_generator.rb +++ b/railties/lib/generators/rails/session_migration/session_migration_generator.rb @@ -1,7 +1,7 @@ module Rails module Generators class SessionMigrationGenerator < NamedBase #metagenerator - argument :name, :type => :string, :default => "add_session_table" + argument :name, :type => :string, :default => "add_sessions_table" hook_for :orm, :required => true end end diff --git a/railties/lib/tasks/databases.rake b/railties/lib/tasks/databases.rake index 0e256737f9..0d4d658315 100644 --- a/railties/lib/tasks/databases.rake +++ b/railties/lib/tasks/databases.rake @@ -411,9 +411,9 @@ namespace :db do desc "Creates a sessions migration for use with ActiveRecord::SessionStore" task :create => :environment do raise "Task unavailable to this database (no migration support)" unless ActiveRecord::Base.connection.supports_migrations? - require 'rails_generator' - require 'rails_generator/scripts/generate' - Rails::Generator::Scripts::Generate.new.run(["session_migration", ENV["MIGRATION"] || "CreateSessions"]) + require 'generators' + require 'generators/rails/session_migration/session_migration_generator' + Rails::Generators::SessionMigrationGenerator.start [ ENV["MIGRATION"] || "add_sessions_table" ] end desc "Clear the sessions table" diff --git a/railties/lib/tasks/documentation.rake b/railties/lib/tasks/documentation.rake index 8b41478a93..db1939c45f 100644 --- a/railties/lib/tasks/documentation.rake +++ b/railties/lib/tasks/documentation.rake @@ -21,7 +21,7 @@ namespace :doc do rdoc.rdoc_files.include('vendor/rails/railties/CHANGELOG') rdoc.rdoc_files.include('vendor/rails/railties/MIT-LICENSE') rdoc.rdoc_files.include('vendor/rails/railties/README') - rdoc.rdoc_files.include('vendor/rails/railties/lib/{*.rb,commands/*.rb,rails_generator/*.rb}') + rdoc.rdoc_files.include('vendor/rails/railties/lib/{*.rb,commands/*.rb,generators/*.rb}') rdoc.rdoc_files.include('vendor/rails/activerecord/README') rdoc.rdoc_files.include('vendor/rails/activerecord/CHANGELOG') rdoc.rdoc_files.include('vendor/rails/activerecord/lib/active_record/**/*.rb') |