Commit 560985b0f685f810a1ce16ae206fbbf81b8fb704

Authored by Dmitriy Zaporozhets
1 parent b096ee32

Fixed link_to_member

app/helpers/projects_helper.rb
... ... @@ -43,7 +43,7 @@ module ProjectsHelper
43 43 tm = project.team_member_by_id(author)
44 44  
45 45 if tm
46   - link_to author_html, project_team_member_path(project, tm), class: "author_link"
  46 + link_to author_html, project_team_member_path(project, tm.user_username), class: "author_link"
47 47 else
48 48 author_html
49 49 end.html_safe
... ...
app/models/users_project.rb
... ... @@ -33,7 +33,7 @@ class UsersProject < ActiveRecord::Base
33 33 validates :project_access, inclusion: { in: [GUEST, REPORTER, DEVELOPER, MASTER] }, presence: true
34 34 validates :project, presence: true
35 35  
36   - delegate :name, :email, to: :user, prefix: true
  36 + delegate :name, :username, :email, to: :user, prefix: true
37 37  
38 38 scope :guests, where(project_access: GUEST)
39 39 scope :reporters, where(project_access: REPORTER)
... ...