Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Tatuya Kamada
gitlab-ce
Commits
76c4e831
Commit
76c4e831
authored
Oct 04, 2012
by
Valeriy Sizov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Minore code-style fixes
parent
810d0903
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
5 additions
and
5 deletions
+5
-5
app/models/group.rb
app/models/group.rb
+1
-1
app/models/project.rb
app/models/project.rb
+2
-2
app/models/user.rb
app/models/user.rb
+1
-1
app/roles/issue_commonality.rb
app/roles/issue_commonality.rb
+1
-1
No files found.
app/models/group.rb
View file @
76c4e831
...
@@ -23,7 +23,7 @@ class Group < ActiveRecord::Base
...
@@ -23,7 +23,7 @@ class Group < ActiveRecord::Base
delegate
:name
,
to: :owner
,
allow_nil:
true
,
prefix:
true
delegate
:name
,
to: :owner
,
allow_nil:
true
,
prefix:
true
def
self
.
search
query
def
self
.
search
query
where
(
"name
like :query OR code like
:query"
,
query:
"%
#{
query
}
%"
)
where
(
"name
LIKE :query OR code LIKE
:query"
,
query:
"%
#{
query
}
%"
)
end
end
def
to_param
def
to_param
...
...
app/models/project.rb
View file @
76c4e831
...
@@ -38,7 +38,7 @@ class Project < ActiveRecord::Base
...
@@ -38,7 +38,7 @@ class Project < ActiveRecord::Base
end
end
def
self
.
search
query
def
self
.
search
query
where
(
"name
like :query OR code like :query OR path like
:query"
,
query:
"%
#{
query
}
%"
)
where
(
"name
LIKE :query OR code LIKE :query OR path LIKE
:query"
,
query:
"%
#{
query
}
%"
)
end
end
def
self
.
create_by_user
(
params
,
user
)
def
self
.
create_by_user
(
params
,
user
)
...
@@ -127,7 +127,7 @@ class Project < ActiveRecord::Base
...
@@ -127,7 +127,7 @@ class Project < ActiveRecord::Base
end
end
def
commit_line_notes
(
commit
)
def
commit_line_notes
(
commit
)
notes
.
where
(
noteable_id:
commit
.
id
,
noteable_type:
"Commit"
).
where
(
"line_code
is not null
"
)
notes
.
where
(
noteable_id:
commit
.
id
,
noteable_type:
"Commit"
).
where
(
"line_code
IS NOT NULL
"
)
end
end
def
public?
def
public?
...
...
app/models/user.rb
View file @
76c4e831
...
@@ -73,7 +73,7 @@ class User < ActiveRecord::Base
...
@@ -73,7 +73,7 @@ class User < ActiveRecord::Base
end
end
def
self
.
search
query
def
self
.
search
query
where
(
"name
like :query or email like
:query"
,
query:
"%
#{
query
}
%"
)
where
(
"name
LIKE :query OR email LIKE
:query"
,
query:
"%
#{
query
}
%"
)
end
end
end
end
...
...
app/roles/issue_commonality.rb
View file @
76c4e831
...
@@ -19,7 +19,7 @@ module IssueCommonality
...
@@ -19,7 +19,7 @@ module IssueCommonality
scope
:opened
,
where
(
closed:
false
)
scope
:opened
,
where
(
closed:
false
)
scope
:closed
,
where
(
closed:
true
)
scope
:closed
,
where
(
closed:
true
)
scope
:of_group
,
->
(
group
)
{
where
(
project_id:
group
.
project_ids
)
}
scope
:of_group
,
->
(
group
)
{
where
(
project_id:
group
.
project_ids
)
}
scope
:assigned
,
lambda
{
|
u
|
where
(
assignee_id:
u
.
id
)}
scope
:assigned
,
->
(
u
)
{
where
(
assignee_id:
u
.
id
)}
delegate
:name
,
delegate
:name
,
:email
,
:email
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment