Commit 2f22874ba6b26c1653bd72d9bcac0bee9e24de8a
1 parent
65c470e8
Exists in
master
and in
4 other branches
Fix group assoc. Show namespace in project list
Showing
2 changed files
with
6 additions
and
2 deletions
Show diff stats
app/models/project.rb
@@ -34,7 +34,7 @@ class Project < ActiveRecord::Base | @@ -34,7 +34,7 @@ class Project < ActiveRecord::Base | ||
34 | attr_accessor :error_code | 34 | attr_accessor :error_code |
35 | 35 | ||
36 | # Relations | 36 | # Relations |
37 | - belongs_to :group, foreign_key: "namespace_id", conditions: 'type = Group' | 37 | + belongs_to :group, foreign_key: "namespace_id", conditions: "type = 'Group'" |
38 | belongs_to :namespace | 38 | belongs_to :namespace |
39 | belongs_to :owner, class_name: "User" | 39 | belongs_to :owner, class_name: "User" |
40 | has_many :users, through: :users_projects | 40 | has_many :users, through: :users_projects |
app/views/dashboard/_projects.html.haml
@@ -12,7 +12,11 @@ | @@ -12,7 +12,11 @@ | ||
12 | - projects.each do |project| | 12 | - projects.each do |project| |
13 | %li.wll | 13 | %li.wll |
14 | = link_to project_path(project), class: dom_class(project) do | 14 | = link_to project_path(project), class: dom_class(project) do |
15 | - %strong.project_name= truncate(project.name, length: 25) | 15 | + - if project.namespace |
16 | + = project.namespace.human_name | ||
17 | + \/ | ||
18 | + %strong.project_name | ||
19 | + = truncate(project.name, length: 25) | ||
16 | %span.arrow | 20 | %span.arrow |
17 | → | 21 | → |
18 | %span.last_activity | 22 | %span.last_activity |