Sha256: c91e475f8f1c00cc77e91e55234f259c552c41b069697559d000828ae82732e1

Contents?: true

Size: 726 Bytes

Versions: 1

Compression:

Stored size: 726 Bytes

Contents

require 'rails/generators/base'
require 'rails/generators/migration'

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

    class_option :orm
    desc 'Instalando Taxweb Widgets'

    desc 'Criando 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 create_migration_file
      migration_template 'create_dashboard-rails_users.rb', 'db/migrate/create_dashboard-rails_users.rb'
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
dashboard-rails-1.0.0 lib/generators/dashboard-rails/install_generator.rb