Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
heptapod
heptapod
Commits
d89d2da03d0e
Commit
d89d2da0
authored
Mar 28, 2019
by
Nick Thomas
Browse files
Inherit from ApplicationRecord instead of ActiveRecord::Base
parent
c4f8d7e5ecfd
Changes
149
Hide whitespace changes
Inline
Side-by-side
app/models/abuse_report.rb
View file @
d89d2da0
# frozen_string_literal: true
class
AbuseReport
<
A
ctiveRecord
::
Base
class
AbuseReport
<
A
pplicationRecord
include
CacheMarkdownField
cache_markdown_field
:message
,
pipeline: :single_line
...
...
app/models/appearance.rb
View file @
d89d2da0
# frozen_string_literal: true
class
Appearance
<
A
ctiveRecord
::
Base
class
Appearance
<
A
pplicationRecord
include
CacheableAttributes
include
CacheMarkdownField
include
ObjectStorage
::
BackgroundMove
...
...
app/models/application_setting.rb
View file @
d89d2da0
# frozen_string_literal: true
class
ApplicationSetting
<
A
ctiveRecord
::
Base
class
ApplicationSetting
<
A
pplicationRecord
include
CacheableAttributes
include
CacheMarkdownField
include
TokenAuthenticatable
...
...
app/models/application_setting/term.rb
View file @
d89d2da0
# frozen_string_literal: true
class
ApplicationSetting
class
Term
<
A
ctiveRecord
::
Base
class
Term
<
A
pplicationRecord
include
CacheMarkdownField
has_many
:term_agreements
...
...
app/models/audit_event.rb
View file @
d89d2da0
# frozen_string_literal: true
class
AuditEvent
<
A
ctiveRecord
::
Base
class
AuditEvent
<
A
pplicationRecord
serialize
:details
,
Hash
# rubocop:disable Cop/ActiveRecordSerialize
belongs_to
:user
,
foreign_key: :author_id
...
...
app/models/award_emoji.rb
View file @
d89d2da0
# frozen_string_literal: true
class
AwardEmoji
<
A
ctiveRecord
::
Base
class
AwardEmoji
<
A
pplicationRecord
DOWNVOTE_NAME
=
"thumbsdown"
.
freeze
UPVOTE_NAME
=
"thumbsup"
.
freeze
...
...
app/models/badge.rb
View file @
d89d2da0
# frozen_string_literal: true
class
Badge
<
A
ctiveRecord
::
Base
class
Badge
<
A
pplicationRecord
include
FromUnion
# This structure sets the placeholders that the urls
...
...
app/models/board.rb
View file @
d89d2da0
# frozen_string_literal: true
class
Board
<
A
ctiveRecord
::
Base
class
Board
<
A
pplicationRecord
belongs_to
:group
belongs_to
:project
...
...
app/models/board_group_recent_visit.rb
View file @
d89d2da0
# frozen_string_literal: true
# Tracks which boards in a specific group a user has visited
class
BoardGroupRecentVisit
<
A
ctiveRecord
::
Base
class
BoardGroupRecentVisit
<
A
pplicationRecord
belongs_to
:user
belongs_to
:group
belongs_to
:board
...
...
app/models/board_project_recent_visit.rb
View file @
d89d2da0
# frozen_string_literal: true
# Tracks which boards in a specific project a user has visited
class
BoardProjectRecentVisit
<
A
ctiveRecord
::
Base
class
BoardProjectRecentVisit
<
A
pplicationRecord
belongs_to
:user
belongs_to
:project
belongs_to
:board
...
...
app/models/broadcast_message.rb
View file @
d89d2da0
# frozen_string_literal: true
class
BroadcastMessage
<
A
ctiveRecord
::
Base
class
BroadcastMessage
<
A
pplicationRecord
include
CacheMarkdownField
include
Sortable
...
...
app/models/chat_name.rb
View file @
d89d2da0
# frozen_string_literal: true
class
ChatName
<
A
ctiveRecord
::
Base
class
ChatName
<
A
pplicationRecord
LAST_USED_AT_INTERVAL
=
1
.
hour
belongs_to
:service
...
...
app/models/chat_team.rb
View file @
d89d2da0
# frozen_string_literal: true
class
ChatTeam
<
A
ctiveRecord
::
Base
class
ChatTeam
<
A
pplicationRecord
validates
:team_id
,
presence:
true
validates
:namespace
,
uniqueness:
true
...
...
app/models/ci/build_metadata.rb
View file @
d89d2da0
...
...
@@ -3,7 +3,7 @@
module
Ci
# The purpose of this class is to store Build related data that can be disposed.
# Data that should be persisted forever, should be stored with Ci::Build model.
class
BuildMetadata
<
A
ctiveRecord
::
Base
class
BuildMetadata
<
A
pplicationRecord
extend
Gitlab
::
Ci
::
Model
include
Presentable
include
ChronicDurationAttribute
...
...
app/models/ci/build_runner_session.rb
View file @
d89d2da0
...
...
@@ -3,7 +3,7 @@
module
Ci
# The purpose of this class is to store Build related runner session.
# Data will be removed after transitioning from running to any state.
class
BuildRunnerSession
<
A
ctiveRecord
::
Base
class
BuildRunnerSession
<
A
pplicationRecord
extend
Gitlab
::
Ci
::
Model
self
.
table_name
=
'ci_builds_runner_session'
...
...
app/models/ci/build_trace_chunk.rb
View file @
d89d2da0
# frozen_string_literal: true
module
Ci
class
BuildTraceChunk
<
A
ctiveRecord
::
Base
class
BuildTraceChunk
<
A
pplicationRecord
include
FastDestroyAll
include
::
Gitlab
::
ExclusiveLeaseHelpers
extend
Gitlab
::
Ci
::
Model
...
...
app/models/ci/build_trace_section.rb
View file @
d89d2da0
# frozen_string_literal: true
module
Ci
class
BuildTraceSection
<
A
ctiveRecord
::
Base
class
BuildTraceSection
<
A
pplicationRecord
extend
Gitlab
::
Ci
::
Model
belongs_to
:build
,
class_name:
'Ci::Build'
...
...
app/models/ci/build_trace_section_name.rb
View file @
d89d2da0
# frozen_string_literal: true
module
Ci
class
BuildTraceSectionName
<
A
ctiveRecord
::
Base
class
BuildTraceSectionName
<
A
pplicationRecord
extend
Gitlab
::
Ci
::
Model
belongs_to
:project
...
...
app/models/ci/group_variable.rb
View file @
d89d2da0
# frozen_string_literal: true
module
Ci
class
GroupVariable
<
A
ctiveRecord
::
Base
class
GroupVariable
<
A
pplicationRecord
extend
Gitlab
::
Ci
::
Model
include
HasVariable
include
Presentable
...
...
app/models/ci/job_artifact.rb
View file @
d89d2da0
# frozen_string_literal: true
module
Ci
class
JobArtifact
<
A
ctiveRecord
::
Base
class
JobArtifact
<
A
pplicationRecord
include
AfterCommitQueue
include
ObjectStorage
::
BackgroundMove
extend
Gitlab
::
Ci
::
Model
...
...
Prev
1
2
3
4
5
…
8
Next
Write
Preview
Supports
Markdown
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