Sha256: c594c1c1e3df7feeda62263649103472d7c55415477983ae1b89482c632c8772

Contents?: true

Size: 483 Bytes

Versions: 10

Compression:

Stored size: 483 Bytes

Contents

module SchemaComments
  module Migration
    def self.included(mod)
      mod.extend(ClassMethods)
      mod.instance_eval do
        alias :migrate_without_schema_comments :migrate
        alias :migrate :migrate_with_schema_comments
      end
    end

    module ClassMethods
      def migrate_with_schema_comments(*args, &block)
        SchemaComments::SchemaComment.yaml_access do
          migrate_without_schema_comments(*args, &block)
        end
      end
    end

  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
schema_comments-0.4.0 lib/schema_comments/migration.rb
schema_comments-0.3.2 lib/schema_comments/migration.rb
schema_comments-0.3.1 lib/schema_comments/migration.rb
schema_comments-0.3.0 lib/schema_comments/migration.rb
schema_comments-0.2.0 lib/schema_comments/migration.rb
schema_comments-0.2.0.alpha5 lib/schema_comments/migration.rb
schema_comments-0.2.0.alpha4 lib/schema_comments/migration.rb
schema_comments-0.2.0.alpha3 lib/schema_comments/migration.rb
schema_comments-0.2.0.alpha2 lib/schema_comments/migration.rb
schema_comments-0.2.0.alpha1 lib/schema_comments/migration.rb