diff options
author | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2013-01-30 19:07:44 +0400 |
---|---|---|
committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2013-01-30 19:07:44 +0400 |
commit | 560985b0f685f810a1ce16ae206fbbf81b8fb704 (patch) | |
tree | 72942aa0af8e3f7db307431ed5b2d9052955dc35 /app | |
parent | b096ee327598919b2d78a99ce82e6b0107369604 (diff) |
Fixed link_to_member
Diffstat (limited to 'app')
-rw-r--r-- | app/helpers/projects_helper.rb | 2 | ||||
-rw-r--r-- | app/models/users_project.rb | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/app/helpers/projects_helper.rb b/app/helpers/projects_helper.rb index 4f0a80710cb..05303e86ae8 100644 --- a/app/helpers/projects_helper.rb +++ b/app/helpers/projects_helper.rb @@ -43,7 +43,7 @@ module ProjectsHelper tm = project.team_member_by_id(author) if tm - link_to author_html, project_team_member_path(project, tm), class: "author_link" + link_to author_html, project_team_member_path(project, tm.user_username), class: "author_link" else author_html end.html_safe diff --git a/app/models/users_project.rb b/app/models/users_project.rb index 183878cb30c..94edfd9eddf 100644 --- a/app/models/users_project.rb +++ b/app/models/users_project.rb @@ -33,7 +33,7 @@ class UsersProject < ActiveRecord::Base validates :project_access, inclusion: { in: [GUEST, REPORTER, DEVELOPER, MASTER] }, presence: true validates :project, presence: true - delegate :name, :email, to: :user, prefix: true + delegate :name, :username, :email, to: :user, prefix: true scope :guests, where(project_access: GUEST) scope :reporters, where(project_access: REPORTER) |