Sha256: 5ae99b0ade74996c8ab3169f5c035ae6d41475d424950aad56b12a9359e41890
Contents?: true
Size: 927 Bytes
Versions: 47
Compression:
Stored size: 927 Bytes
Contents
module BootstrapLeather class InstallGenerator < Rails::Generators::Base source_root File.expand_path("../templates", __FILE__) require File.expand_path('../../utils', __FILE__) include Generators::Utils include Rails::Generators::Migration # all public methods in here will be run in order 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 def self.next_migration_number(dirname) if ActiveRecord::Base.timestamped_migrations 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 end end
Version data entries
47 entries across 47 versions & 1 rubygems