My Account link goes to profile page

when :profile feature is enabled
This two codes from this two views are very similiar. Can be extracted to a partial, passing the differences in the locals assigns?