Sha256: 42b397ca3091827d7ee7403efa3c4b63cd8d61735e26530083ba6a965369a46b

Contents?: true

Size: 606 Bytes

Versions: 8

Compression:

Stored size: 606 Bytes

Contents

module SchemaPlus
  module ActiveRecord
    module Schema #:nodoc: all
      def self.included(base)
        base.extend(ClassMethods)
      end

      module ClassMethods
        def self.extended(base)
          class << base
            attr_accessor :defining
            alias :defining? :defining

            alias_method_chain :define, :schema_plus
          end
        end

        def define_with_schema_plus(info={}, &block)
          self.defining = true
          define_without_schema_plus(info, &block)
        ensure
          self.defining = false
        end
      end
    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
schema_plus-0.1.3 lib/schema_plus/active_record/schema.rb
schema_plus-0.1.2 lib/schema_plus/active_record/schema.rb
schema_plus-0.1.1 lib/schema_plus/active_record/schema.rb
schema_plus-0.1.0 lib/schema_plus/active_record/schema.rb
schema_plus-0.1.0.pre4 lib/schema_plus/active_record/schema.rb
schema_plus-0.1.0.pre3 lib/schema_plus/active_record/schema.rb
schema_plus-0.1.0.pre2 lib/schema_plus/active_record/schema.rb
schema_plus-0.1.0.pre1 lib/schema_plus/active_record/schema.rb