Add render_error to blob JSON
This commit is contained in:
parent
0c4b369c30
commit
869668c9cf
1 changed files with 2 additions and 1 deletions
|
@ -58,10 +58,11 @@ class Projects::BlobController < Projects::ApplicationController
|
||||||
simple_viewer: blob.simple_viewer&.class&.partial_name,
|
simple_viewer: blob.simple_viewer&.class&.partial_name,
|
||||||
rich_viewer: blob.rich_viewer&.class&.partial_name,
|
rich_viewer: blob.rich_viewer&.class&.partial_name,
|
||||||
show_viewer_switcher: !!blob.show_viewer_switcher?,
|
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),
|
raw_path: project_raw_path(project, @id),
|
||||||
blame_path: project_blame_path(project, @id),
|
blame_path: project_blame_path(project, @id),
|
||||||
commits_path: project_commits_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
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue