replace deprecated delegate and delegate_to with has_attributes; closes ...

...#519