Need help with the commit calendar - creating links to a commit and a project in ruby


I’m currently extending the commit calendar so it actually shows what commits were made on a specific date.
I’ve gotten to the point where i have a collection containing the commit id, desciption, date and the associated project.
My problem currently is, that the function project_commit_path isn’t available from let’s say the user_controller (or any other file that isn’t directly linked to haml display… At least i think that’s how it works…

Can somebody please give me advise how to create a link?
in haml it would be “project_commit_path(project,” But as i said: i can’t access that function from where i want.


And in case someone wants to look at the code:

I’ve solved this somehow by using the project import_url as a basis.
I don’t really like my current implementation, but it’s enough to warrant a MR and get some feedback on it.