Sha256: 4661fc56754ed10c8fa5f65e951c922876fcc6ef24f617ddeb8a2121cc9d6885

Contents?: true

Size: 668 Bytes

Versions: 1

Compression:

Stored size: 668 Bytes

Contents

require 'rails/generators/active_record'

module ActiveRecord
  module Generators
    class RubyGalleryGenerator < ActiveRecord::Generators::Base
      argument :attributes, :type => :array, :default => [], :banner => "filed:type field:type"
      
      source_root File.expand_path("../templates", __FILE__)
      
      def copy_ruby_gallery_migration
        migration_template "album_photo_migration.rb", "db/migrate/create_ablum_photo_table"
        migration_template "migration.rb", "db/migrate/ruby_gallery_add_columns_to_#{table_name}"
        migration_template "album_attachment_migration.rb", "db/migrate/create_album_attachment_table"
      end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
ruby_gallery-0.1.1 lib/generators/active_record/ruby_gallery_generator.rb