class ActiveRecord::Reflection::AssociationReflection
def collection?
association. Returns +true+ if the +macro+ is one of +has_many+ or
Returns whether or not this association reflection is for a collection
def collection? if @collection.nil? @collection = [:has_many, :has_and_belongs_to_many].include?(macro) end @collection end