Module: ActiveRecord::ConnectionAdapters::ShadowCoreMethods
- Included in:
- JdbcAdapter
- Defined in:
- lib/arjdbc/jdbc/core_ext.rb
Overview
Allows properly re-wrapping/re-defining methods that may already be alias_method_chain’d.
Instance Method Summary collapse
Instance Method Details
#alias_chained_method(meth, feature, target) ⇒ Object
15 16 17 18 19 20 21 |
# File 'lib/arjdbc/jdbc/core_ext.rb', line 15 def alias_chained_method(meth, feature, target) if instance_methods.include?("#{meth}_without_#{feature}") alias_method "#{meth}_without_#{feature}".to_sym, target else alias_method meth, target if meth != target end end |