Revert "Revert "Fix contextual_link_to and contextual_links_for calls.""

This reverts commit 99f9bf59bfbc79a217337ae7b2ebf6a9ba8ba0e6.