PeterHamilton/citier — pull request #63 by bigfive (2012-09-24 09:47:37+00:00)
Title: Delegate reflect_on_association to root class

Delegate reflect_on_association to the citier root class if a reflection is not found on the child class.
This is needed for polymorphic associations
The below will fail without the proposed change

class Node < ActiveRecord::Base
acts_as_citier
has_many :comments, :as => :commentable
end

class Page < Node
acts_as_citier
end

class Comment < ActiveRecord::Base
belongs_to :commentable, :polymorphic => true
end

Page.first.comments # NoMethodError: undefined method `association_class' for nil:NilClass