Class: Rails::Snowflake::Generators::InstallGenerator
- Inherits:
-
Generators::Base
- Object
- Generators::Base
- Rails::Snowflake::Generators::InstallGenerator
- Includes:
- ActiveRecord::Generators::Migration
- Defined in:
- lib/rails/snowflake/generators/install/install_generator.rb
Constant Summary collapse
- TEMPLATES =
File.join(File.dirname(__FILE__), "templates")
Class Method Summary collapse
-
.namespace(name = nil) ⇒ Object
Ensure the Thor/Rails namespace is rails_snowflake:install.
Instance Method Summary collapse
Class Method Details
.namespace(name = nil) ⇒ Object
Ensure the Thor/Rails namespace is rails_snowflake:install
13 14 15 16 17 18 19 |
# File 'lib/rails/snowflake/generators/install/install_generator.rb', line 13 def self.namespace(name = nil) if name super else @namespace ||= "rails_snowflake:install" end end |
Instance Method Details
#create_migration_file ⇒ Object
26 27 28 |
# File 'lib/rails/snowflake/generators/install/install_generator.rb', line 26 def create_migration_file migration_template "install_snowflake_id.rb.erb", File.join(db_migrate_path, "install_snowflake_id.rb") end |