Skip to content
Snippets Groups Projects
Commit 76c4e831 authored by Valeriy Sizov's avatar Valeriy Sizov
Browse files

Minore code-style fixes

parent 810d0903
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -23,7 +23,7 @@ class Group < ActiveRecord::Base
delegate :name, to: :owner, allow_nil: true, prefix: true
 
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
 
def to_param
Loading
Loading
Loading
Loading
@@ -38,7 +38,7 @@ class Project < ActiveRecord::Base
end
 
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
 
def self.create_by_user(params, user)
Loading
Loading
@@ -127,7 +127,7 @@ class Project < ActiveRecord::Base
end
 
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
 
def public?
Loading
Loading
Loading
Loading
@@ -73,7 +73,7 @@ class User < ActiveRecord::Base
end
 
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
 
Loading
Loading
Loading
Loading
@@ -19,7 +19,7 @@ module IssueCommonality
scope :opened, where(closed: false)
scope :closed, where(closed: true)
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,
:email,
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment