Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFilipa Lacerda <filipa@gitlab.com>2017-08-10 13:12:22 +0300
committerFilipa Lacerda <filipa@gitlab.com>2017-08-10 13:12:22 +0300
commitfbf241e8aede13836aaead0a7f19ab1ff219033e (patch)
tree5885c6ad3afdac9b76236bfaa5027b12f0bd203f /app/models/note.rb
parent16b15a11761ca93377f536a744f21fcd19fc78bf (diff)
parent188181b780c5c0e5b05339daddad9c25c3b1bf85 (diff)
Merge branch 'master' into issue-discussions-refactor
* master: (42 commits) alternative route for download archive Add missing command to compile GetText files Prevent user from changing username with container registry tags Rename RPC 'Exists' to 'RepositoryExists' Fix the sticky changes bar on commits page Fix ee_compat_check when EE branch uses a prefix Removed display styles when hiding the fly out navigation Explain why we use select all for project_url_constrainer.rb Fix pikaday being undefined Add a helper to stub storage settings with defaults Enable the Layout/SpaceBeforeBlockBraces cop update Install from Source instructions Translations can be picked without asking for exceptions Ask for exceptions in advance Don't require stackprof in Gemfile Synchronous Korean translation in zanata Use full path of user's avatar in webhooks Update icon color on hover Align all nav items in sidebar Fix height of collapsed sidebar items ...
Diffstat (limited to 'app/models/note.rb')
-rw-r--r--app/models/note.rb20
1 files changed, 10 insertions, 10 deletions
diff --git a/app/models/note.rb b/app/models/note.rb
index 0e120e7de16..aa8e03ce302 100644
--- a/app/models/note.rb
+++ b/app/models/note.rb
@@ -77,20 +77,20 @@ class Note < ActiveRecord::Base
# Scopes
scope :for_commit_id, ->(commit_id) { where(noteable_type: "Commit", commit_id: commit_id) }
- scope :system, ->{ where(system: true) }
- scope :user, ->{ where(system: false) }
- scope :common, ->{ where(noteable_type: ["", nil]) }
- scope :fresh, ->{ order(created_at: :asc, id: :asc) }
- scope :updated_after, ->(time){ where('updated_at > ?', time) }
- scope :inc_author_project, ->{ includes(:project, :author) }
- scope :inc_author, ->{ includes(:author) }
+ scope :system, -> { where(system: true) }
+ scope :user, -> { where(system: false) }
+ scope :common, -> { where(noteable_type: ["", nil]) }
+ scope :fresh, -> { order(created_at: :asc, id: :asc) }
+ scope :updated_after, ->(time) { where('updated_at > ?', time) }
+ scope :inc_author_project, -> { includes(:project, :author) }
+ scope :inc_author, -> { includes(:author) }
scope :inc_relations_for_view, -> do
includes(:project, :author, :updated_by, :resolved_by, :award_emoji, :system_note_metadata)
end
- scope :diff_notes, ->{ where(type: %w(LegacyDiffNote DiffNote)) }
- scope :new_diff_notes, ->{ where(type: 'DiffNote') }
- scope :non_diff_notes, ->{ where(type: ['Note', 'DiscussionNote', nil]) }
+ scope :diff_notes, -> { where(type: %w(LegacyDiffNote DiffNote)) }
+ scope :new_diff_notes, -> { where(type: 'DiffNote') }
+ scope :non_diff_notes, -> { where(type: ['Note', 'DiscussionNote', nil]) }
scope :with_associations, -> do
# FYI noteable cannot be loaded for LegacyDiffNote for commits