Sha256: 387ee29638021284da49969b1de09aefb2698cf83cefb06173067a0848fdbfc0

Contents?: true

Size: 224 Bytes

Versions: 4

Compression:

Stored size: 224 Bytes

Contents

module RailsMacros
  def relation_class(klass)
    if ActiveRecord::VERSION::MAJOR == 3
      ActiveRecord::Relation
    else
      "ActiveRecord::Relation::ActiveRecord_Relation_#{klass.name}".constantize
    end
  end
end

Version data entries

4 entries across 4 versions & 2 rubygems

Version Path
partisan-0.4 spec/support/macros/rails_macros.rb
partisan-0.3 spec/support/macros/rails_macros.rb
camaraderie-0.2 spec/support/macros/rails_macros.rb
partisan-0.2.3 spec/support/macros/rails_macros.rb