class Landlady::Generators::InstallGenerator
Public Class Methods
next_migration_number(path)
click to toggle source
# File lib/generators/landlady/install_generator.rb, line 11 def self.next_migration_number(path) 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 end
Public Instance Methods
copy_migrations()
click to toggle source
# File lib/generators/landlady/install_generator.rb, line 20 def copy_migrations migration_template "create_tenants.rb", "db/migrate/create_tenants.rb" end