You need to improve understanding of MVC pattern.
Yes the code might work but work is not equal to good. (You missed a comma after first arg but I assume they are misspelling)
View is for present only. It should be dumb without knowing much logic. Like a client sitting in restaurant, View just eat the food without knowing how it cooked.
The MVC way is to prepare such food in Controller and feed View with instance variable(s).
# Controller
def show
@project = User.projects.whatever
end
# View
<%= link_to "Project ABC", @project %>