fixed undefined method version_key for ActiveRecord::Associations::JoinDependency::JoinAssociation:Class issue