Module: RedhillonrailsCore::ActiveRecord::Schema::ClassMethods

Defined in:
lib/redhillonrails_core/active_record/schema.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.extended(base) ⇒ Object



9
10
11
12
13
14
15
16
# File 'lib/redhillonrails_core/active_record/schema.rb', line 9

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

    alias_method_chain :define, :redhillonrails_core
  end
end

Instance Method Details

#define_with_redhillonrails_core(info = {}, &block) ⇒ Object



18
19
20
21
22
23
# File 'lib/redhillonrails_core/active_record/schema.rb', line 18

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