diff options
author | Douwe Maan <douwe@selenight.nl> | 2017-08-03 17:27:19 +0300 |
---|---|---|
committer | Douwe Maan <douwe@selenight.nl> | 2017-08-03 17:36:04 +0300 |
commit | 869668c9cf93142083480a736e93af818ccdf8d6 (patch) | |
tree | 58b2e4f4fe1aeae80e74db63709f93ccdb51fa42 /app/controllers/projects/blob_controller.rb | |
parent | 0c4b369c30b3a61d95b09b84686ec69c26164063 (diff) |
Add render_error to blob JSON
Diffstat (limited to 'app/controllers/projects/blob_controller.rb')
-rw-r--r-- | app/controllers/projects/blob_controller.rb | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/app/controllers/projects/blob_controller.rb b/app/controllers/projects/blob_controller.rb index 7a8fad436ac..1716c8a7f61 100644 --- a/app/controllers/projects/blob_controller.rb +++ b/app/controllers/projects/blob_controller.rb @@ -58,10 +58,11 @@ class Projects::BlobController < Projects::ApplicationController simple_viewer: blob.simple_viewer&.class&.partial_name, rich_viewer: blob.rich_viewer&.class&.partial_name, show_viewer_switcher: !!blob.show_viewer_switcher?, + render_error: blob.simple_viewer&.render_error || blob.rich_viewer&.render_error, raw_path: project_raw_path(project, @id), blame_path: project_blame_path(project, @id), commits_path: project_commits_path(project, @id), - permalink: project_blob_path(project, File.join(@commit.id, @path)), + permalink: project_blob_path(project, File.join(@commit.id, @path)) ) end end |