add another version switch

to make #assign_attributes work with rails 3 and 4.