We explore the critical behavior of two- and three-dimensional lattice models of polymers in dilute solution where the monomers carry a magnetic moment which interacts ferromagnetically with near-neighbor monomers. Specifically, the model explored consists of a self-avoiding walk on a square or cubic lattice with Ising spins on the visited sites. In three dimensions we confirm and extend previous numerical work, showing clearly the first-order character of both the magnetic transition and the polymer collapse, which happen together. We present results in two dimensions, where the transition is seen to be continuous. Finite-size scaling is used to extract estimates for the critical exponents and the transition temperature in the absence of an external magnetic field.