Class: ActiveRecord::Relation

Inherits:
Object
  • Object
show all
Defined in:
lib/collectively.rb

Overview

Active Record Relation

Instance Method Summary collapse

Instance Method Details

#collectionObject



4
5
6
7
8
9
# File 'lib/collectively.rb', line 4

def collection
  @_collection ||= begin
    kollection = ActiveSupport::Dependencies.constantize(klass.collectively_as)
    kollection.new(self)
  end
end