1 class SessionMigrationGenerator < Rails::Generator::NamedBase
2 def initialize(runtime_args, runtime_options = {})
3 runtime_args << 'add_session_table' if runtime_args.empty?
9 m.migration_template 'migration.rb', 'db/migrate',
10 :assigns => { :session_table_name => default_session_table_name }
15 def default_session_table_name
16 ActiveRecord::Base.pluralize_table_names ? 'session'.pluralize : 'session'