Fixed some tests and snippet colorize
This commit is contained in:
parent
470aa7675e
commit
9304d049de
13 changed files with 64 additions and 68 deletions
|
@ -86,7 +86,7 @@ class Project < ActiveRecord::Base
|
|||
|
||||
def create_by_user(params, user)
|
||||
namespace_id = params.delete(:namespace_id)
|
||||
namespace_id ||= user.namespace_id
|
||||
namespace_id ||= user.namespace.try(:id)
|
||||
|
||||
project = Project.new params
|
||||
|
||||
|
@ -222,6 +222,8 @@ class Project < ActiveRecord::Base
|
|||
end
|
||||
end
|
||||
|
||||
def move_repo
|
||||
# For compatibility with old code
|
||||
def code
|
||||
path
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue