AWS services or capabilities described in AWS Documentation may vary by region/location. Click Getting Started with Amazon AWS to see specific differences applicable to the China (Beijing) Region.

Class: Sessionstore::Generators::DynamodbGenerator

Inherits:
Rails::Generators::NamedBase
  • Object
show all
Includes:
Rails::Generators::Migration
Defined in:
lib/rails/generators/sessionstore/dynamodb/dynamodb_generator.rb

Instance Method Summary collapse

Instance Method Details

#copy_sample_config_fileObject



37
38
39
40
# File 'lib/rails/generators/sessionstore/dynamodb/dynamodb_generator.rb', line 37

def copy_sample_config_file
  file = File.join("sessionstore", "dynamodb.yml")
  template file, File.join(Rails.root, "config", file)
end

#generate_migration_fileRails Migration File

Returns migration file for creation and deletion of session table.

Returns:

  • (Rails Migration File)

    migration file for creation and deletion of session table.



31
32
33
34
# File 'lib/rails/generators/sessionstore/dynamodb/dynamodb_generator.rb', line 31

def generate_migration_file
  migration_template "sessionstore_migration.rb",
    "#{Rails.root}/db/migrate/#{file_name}"
end