diff options
author | Jan Provaznik <jprovaznik@gitlab.com> | 2018-02-23 15:45:32 +0100 |
---|---|---|
committer | Jan Provaznik <jprovaznik@gitlab.com> | 2018-02-26 10:10:21 +0100 |
commit | 22addf26732e15bd63112c21f03a7f20c5feabc9 (patch) | |
tree | 983a54b1f7238e66581ab390dd1126f69e7de3f7 /app/views/projects/issues | |
parent | 7eaafea288cc43f7e314e44c6e46c87661cfd21d (diff) | |
download | gitlab-ce-22addf26732e15bd63112c21f03a7f20c5feabc9.tar.gz |
Don't convert issuable_initial_data into JSONjprovazn-issuable-data
Instead of converting hash into JSON inside
issuable_initial_data method, return hash and convert
to JSON later. This allows us to easily extend basic
issuable data with resource specific values. For example
for Epic these data should include also labels, so we can then
do something like:
issuable_initial_data(@epic).merge(labels: @epic.labels).to_json
Diffstat (limited to 'app/views/projects/issues')
-rw-r--r-- | app/views/projects/issues/show.html.haml | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/app/views/projects/issues/show.html.haml b/app/views/projects/issues/show.html.haml index 7bc5c46d64a..d63443c9da5 100644 --- a/app/views/projects/issues/show.html.haml +++ b/app/views/projects/issues/show.html.haml @@ -55,7 +55,7 @@ .issue-details.issuable-details .detail-page-description.content-block - %script#js-issuable-app-initial-data{ type: "application/json" }= issuable_initial_data(@issue) + %script#js-issuable-app-initial-data{ type: "application/json" }= issuable_initial_data(@issue).to_json #js-issuable-app %h2.title= markdown_field(@issue, :title) - if @issue.description.present? |