[EE] Use hashrocket for dasherized attribute
EE version of https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/8775
This change has been included in https://gitlab.com/gitlab-org/gitlab-ee/merge_requests/1116 so it may become useless after !1116 (merged) is merged.