Sha256: f6be10177be532175ce3d1ec971f1b69ae8e6acf2e8382bc87e54a48ccdd223d

Contents?: true

Size: 790 Bytes

Versions: 72

Compression:

Stored size: 790 Bytes

Contents

module Bankserv
  module Generators
    class InstallGenerator < Rails::Generators::Base
      include Rails::Generators::Migration
      
      source_root File.expand_path("../templates", __FILE__)

      desc <<-CONTENT
        Copies the bankserv migration file to the migrations
        folder.
        
        Please run rake db:migrate once the installer is 
        complete.

  CONTENT

      def self.next_migration_number(dirname) #:nodoc:
        if ActiveRecord::Base.timestamped_migrations
          Time.now.utc.strftime("%Y%m%d%H%M%S")
        else
          "%.3d" % (current_migration_number(dirname) + 1)
        end
      end

      def create_migration_file
        migration_template 'migration.rb', 'db/migrate/create_bankserv_tables.rb'
      end
    end
  end
end

Version data entries

72 entries across 72 versions & 1 rubygems

Version Path
bankserv-0.8.6 lib/generators/active_record/bankserv_generator.rb
bankserv-0.8.5 lib/generators/active_record/bankserv_generator.rb
bankserv-0.8.4 lib/generators/active_record/bankserv_generator.rb
bankserv-0.8.2 lib/generators/active_record/bankserv_generator.rb
bankserv-0.8.1 lib/generators/active_record/bankserv_generator.rb
bankserv-0.8.0 lib/generators/active_record/bankserv_generator.rb
bankserv-0.7.9 lib/generators/active_record/bankserv_generator.rb
bankserv-0.7.8 lib/generators/active_record/bankserv_generator.rb
bankserv-0.7.7 lib/generators/active_record/bankserv_generator.rb
bankserv-0.7.6 lib/generators/active_record/bankserv_generator.rb
bankserv-0.7.5 lib/generators/active_record/bankserv_generator.rb
bankserv-0.7.4 lib/generators/active_record/bankserv_generator.rb
bankserv-0.7.3 lib/generators/active_record/bankserv_generator.rb
bankserv-0.7.2 lib/generators/active_record/bankserv_generator.rb
bankserv-0.7.1 lib/generators/active_record/bankserv_generator.rb
bankserv-0.7.0 lib/generators/active_record/bankserv_generator.rb
bankserv-0.6.9 lib/generators/active_record/bankserv_generator.rb
bankserv-0.6.8 lib/generators/active_record/bankserv_generator.rb
bankserv-0.6.7 lib/generators/active_record/bankserv_generator.rb
bankserv-0.6.6 lib/generators/active_record/bankserv_generator.rb