Sha256: bc6bfa899ad0f6d74108099f491fb9d1d6e6c5427b12914271250a0a3df4d1ba

Contents?: true

Size: 667 Bytes

Versions: 6

Compression:

Stored size: 667 Bytes

Contents

require 'rails/generators'
require 'rails/generators/migration'
require File.expand_path('../utils', __FILE__)

module AmpleAssets
  class InstallGenerator < Rails::Generators::Base
    include Rails::Generators::Migration
    
    desc "Copies migrations file for AmpleAssets."

    source_root File.expand_path('../templates', __FILE__)
    class << self
      include Generators::Utils
    end
    
    def self.source_root
      @source_root ||= File.join(File.dirname(__FILE__), 'templates')
    end
    
    def create_migration_file
       migration_template 'migration.rb', 'db/migrate/create_ample_assets_tables.rb' rescue p $!.message
    end
    
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
ample_assets-0.0.7 lib/generators/ample_assets/install_generator.rb
ample_assets-0.0.6 lib/generators/ample_assets/install_generator.rb
ample_assets-0.0.4 lib/generators/ample_assets/install_generator.rb
ample_assets-0.0.3 lib/generators/ample_assets/install_generator.rb
ample_assets-0.0.2 lib/generators/ample_assets/install_generator.rb
ample_assets-0.0.1 lib/generators/ample_assets/install_generator.rb