Class: SessionMigrationGenerator
- Inherits:
-
Rails::Generator::NamedBase
- Object
- Rails::Generator::Base
- Rails::Generator::NamedBase
- SessionMigrationGenerator
- Defined in:
- lib/rails_generator/generators/components/session_migration/session_migration_generator.rb
Instance Attribute Summary
Attributes inherited from Rails::Generator::NamedBase
#class_name, #class_nesting, #class_nesting_depth, #class_path, #file_path, #name, #plural_name, #singular_name, #table_name
Attributes inherited from Rails::Generator::Base
#args, #destination_root, #source_root
Attributes included from Rails::Generator::Options
Instance Method Summary collapse
-
#initialize(runtime_args, runtime_options = {}) ⇒ SessionMigrationGenerator
constructor
A new instance of SessionMigrationGenerator.
- #manifest ⇒ Object
Methods inherited from Rails::Generator::Base
#after_generate, #destination_path, #source_path
Methods included from Rails::Generator::Options
Constructor Details
#initialize(runtime_args, runtime_options = {}) ⇒ SessionMigrationGenerator
Returns a new instance of SessionMigrationGenerator.
2 3 4 5 |
# File 'lib/rails_generator/generators/components/session_migration/session_migration_generator.rb', line 2 def initialize(runtime_args, = {}) runtime_args << 'add_session_table' if runtime_args.empty? super end |
Instance Method Details
#manifest ⇒ Object
7 8 9 10 11 12 |
# File 'lib/rails_generator/generators/components/session_migration/session_migration_generator.rb', line 7 def manifest record do |m| m.migration_template 'migration.rb', 'db/migrate', :assigns => { :session_table_name => default_session_table_name } end end |