Sha256: 921dcecd645224620c81f6d2c25887201591f57cd653de89c4e5eca20a91fe66
Contents?: true
Size: 763 Bytes
Versions: 5
Compression:
Stored size: 763 Bytes
Contents
module Saasaparilla module Generators class InstallGenerator < ::Rails::Generators::Base include Rails::Generators::Migration source_root File.expand_path('../templates', __FILE__) desc "add the migrations" 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 def copy_migrations migration_template "create_saasaparilla_tables.rb", "db/migrate/create_saasaparilla_tables.rb" end def copy_config copy_file 'saasaparilla.yml', 'config/saasaparilla.yml' end end end end
Version data entries
5 entries across 5 versions & 1 rubygems