Module: DbCharmer::ActiveRecord::Relation::ArelEngine

Defined in:
lib/db_charmer/rails3/active_record/relation/arel_engine.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.extended(base) ⇒ Object



6
7
8
9
10
# File 'lib/db_charmer/rails3/active_record/relation/arel_engine.rb', line 6

def self.extended(base)
  class << base
    alias_method_chain :arel_engine, :db_charmer
  end
end

Instance Method Details

#arel_engine_with_db_charmerObject

Use the model itself an engine for Arel, do not fall back to AR::Base That guarantees the correct connection will be used in Arel::Table for determining list of columns and stuff.



15
16
17
# File 'lib/db_charmer/rails3/active_record/relation/arel_engine.rb', line 15

def arel_engine_with_db_charmer(*)
  self
end