Class: BootstrapLeather::InstallGenerator
- Inherits:
-
Rails::Generators::Base
- Object
- Rails::Generators::Base
- BootstrapLeather::InstallGenerator
- Includes:
- Generators::Utils, Rails::Generators::Migration
- Defined in:
- lib/generators/bootstrap_leather/install/install_generator.rb
Class Method Summary collapse
Instance Method Summary collapse
-
#add_initializer ⇒ Object
all public methods in here will be run in order.
Methods included from Generators::Utils
Class Method Details
.next_migration_number(dirname) ⇒ Object
15 16 17 18 19 20 21 22 23 24 25 26 |
# File 'lib/generators/bootstrap_leather/install/install_generator.rb', line 15 def self.next_migration_number(dirname) if ActiveRecord::Base. unless @prev_migration_nr @prev_migration_nr = Time.now.utc.strftime("%Y%m%d%H%M%S").to_i else @prev_migration_nr += 1 end @prev_migration_nr.to_s else "%.3d" % (current_migration_number(dirname) + 1) end end |
Instance Method Details
#add_initializer ⇒ Object
all public methods in here will be run in order
10 11 12 13 |
# File 'lib/generators/bootstrap_leather/install/install_generator.rb', line 10 def add_initializer output "You'll be wanting an initializer. This is where you put your configuration options.", :magenta template "initializer.rb", "config/initializers/bootstrap_leather.rb" end |