Module: ActiveRecord::ConnectionAdapters::OracleEnhancedProcedures::InstanceMethods

Defined in:
lib/active_record/connection_adapters/oracle_enhanced_procedures.rb

Class Method Summary collapse

Class Method Details

.included(base) ⇒ Object



39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
# File 'lib/active_record/connection_adapters/oracle_enhanced_procedures.rb', line 39

def self.included(base)
  base.instance_eval do
    alias_method_chain :create, :custom_method
    # insert after dirty checking in Rails 2.1
    # in Ruby 1.9 methods names are returned as symbols
    if private_instance_methods.include?('update_without_dirty') || private_instance_methods.include?(:update_without_dirty)
      alias_method :update_without_custom_method, :update_without_dirty
      alias_method :update_without_dirty, :update_with_custom_method
    else
      alias_method_chain :update, :custom_method
    end
    private :create, :update
    alias_method_chain :destroy, :custom_method
    public :destroy
  end
end