diff options
Diffstat (limited to 'app/models')
-rw-r--r-- | app/models/blob.rb | 4 | ||||
-rw-r--r-- | app/models/blob_viewer/server_side.rb | 4 | ||||
-rw-r--r-- | app/models/repository.rb | 2 |
3 files changed, 6 insertions, 4 deletions
diff --git a/app/models/blob.rb b/app/models/blob.rb index 6a42a12891c..fd95a1b299b 100644 --- a/app/models/blob.rb +++ b/app/models/blob.rb @@ -94,6 +94,10 @@ class Blob < SimpleDelegator end end + def load_all_data! + super(project.repository) if project + end + def no_highlighting? raw_size && raw_size > MAXIMUM_TEXT_HIGHLIGHT_SIZE end diff --git a/app/models/blob_viewer/server_side.rb b/app/models/blob_viewer/server_side.rb index 05a3dd7d913..e6bcacf7f70 100644 --- a/app/models/blob_viewer/server_side.rb +++ b/app/models/blob_viewer/server_side.rb @@ -9,9 +9,7 @@ module BlobViewer end def prepare! - if blob.project - blob.load_all_data!(blob.project.repository) - end + blob.load_all_data! end def render_error diff --git a/app/models/repository.rb b/app/models/repository.rb index 07e0b3bae4f..981cb8f2e53 100644 --- a/app/models/repository.rb +++ b/app/models/repository.rb @@ -1102,7 +1102,7 @@ class Repository blob = blob_at(sha, path) return unless blob - blob.load_all_data!(self) + blob.load_all_data! blob.data end |