Fixed link_to_member
This commit is contained in:
parent
b096ee3275
commit
560985b0f6
2 changed files with 2 additions and 2 deletions
|
@ -43,7 +43,7 @@ module ProjectsHelper
|
||||||
tm = project.team_member_by_id(author)
|
tm = project.team_member_by_id(author)
|
||||||
|
|
||||||
if tm
|
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
|
else
|
||||||
author_html
|
author_html
|
||||||
end.html_safe
|
end.html_safe
|
||||||
|
|
|
@ -33,7 +33,7 @@ class UsersProject < ActiveRecord::Base
|
||||||
validates :project_access, inclusion: { in: [GUEST, REPORTER, DEVELOPER, MASTER] }, presence: true
|
validates :project_access, inclusion: { in: [GUEST, REPORTER, DEVELOPER, MASTER] }, presence: true
|
||||||
validates :project, 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 :guests, where(project_access: GUEST)
|
||||||
scope :reporters, where(project_access: REPORTER)
|
scope :reporters, where(project_access: REPORTER)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue