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 | 34 | attr_accessor :error_code |
35 | 35 | |
36 | 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 | 38 | belongs_to :namespace |
39 | 39 | belongs_to :owner, class_name: "User" |
40 | 40 | has_many :users, through: :users_projects | ... | ... |
app/views/dashboard/_projects.html.haml
... | ... | @@ -12,7 +12,11 @@ |
12 | 12 | - projects.each do |project| |
13 | 13 | %li.wll |
14 | 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 | 20 | %span.arrow |
17 | 21 | → |
18 | 22 | %span.last_activity | ... | ... |