Using assign_attributes rather than iterating through the hash and setting the option values manually