Module: CachedCommit
- Extended by:
- ActiveSupport::Concern
- Included in:
- MergeRequestContextCommit, MergeRequestDiffCommit
- Defined in:
- app/models/concerns/cached_commit.rb
Instance Method Summary collapse
- #extended_trailers ⇒ Object
-
#parent_ids ⇒ Object
We don’t save these, because they would need a table or a serialised field.
-
#referenced_by ⇒ Object
These are not saved.
- #to_hash ⇒ Object
Instance Method Details
#extended_trailers ⇒ Object
23 24 25 |
# File 'app/models/concerns/cached_commit.rb', line 23 def extended_trailers {} end |
#parent_ids ⇒ Object
We don’t save these, because they would need a table or a serialised field. They aren’t used anywhere, so just pretend the commit has no parents.
14 15 16 |
# File 'app/models/concerns/cached_commit.rb', line 14 def parent_ids [] end |
#referenced_by ⇒ Object
These are not saved
19 20 21 |
# File 'app/models/concerns/cached_commit.rb', line 19 def referenced_by [] end |
#to_hash ⇒ Object
6 7 8 9 10 |
# File 'app/models/concerns/cached_commit.rb', line 6 def to_hash Gitlab::Git::Commit::SERIALIZE_KEYS.index_with do |key| public_send(key) # rubocop:disable GitlabSecurity/PublicSend end end |