Sha256: e2c136605fa509067aa34533c9d9f4a0452468daae7ac009eb4425e31208388a

Contents?: true

Size: 504 Bytes

Versions: 5

Compression:

Stored size: 504 Bytes

Contents

require 'generators/wiser_chat'
require 'rails/generators/active_record'

module WiserChat
  module Generators
    # Migration generator that creates migration file from template
    class MigrationGenerator < ActiveRecord::Generators::Base
      extend Base
      argument :name, :type => :string, :default => 'create_wiser_chat_messages'
      # Create migration in project's folder
      def generate_files
        migration_template 'migration.rb', "db/migrate/#{name}.rb"
      end
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
wiser_chat-0.1.4 lib/generators/wiser_chat/migration/migration_generator.rb
wiser_chat-0.1.3 lib/generators/wiser_chat/migration/migration_generator.rb
wiser_chat-0.1.2 lib/generators/wiser_chat/migration/migration_generator.rb
wiser_chat-0.1.1 lib/generators/wiser_chat/migration/migration_generator.rb
wiser_chat-0.1.0 lib/generators/wiser_chat/migration/migration_generator.rb