Updated for Moped v2, Rails v4.