BigW Consortium Gitlab

Fix helper methods returning wrong data types for vue

parent d537a9a4
module EditableHelper
def updated_at_by(editable)
return nil unless editable.is_edited?
return {} unless editable.is_edited?
{
updated_at: editable.updated_at,
......
......@@ -276,9 +276,13 @@ module IssuablesHelper
end
def issuable_app_data(project, issue)
data = { "endpoint" => realtime_changes_namespace_project_issue_path(project.namespace, project, issue), "can-update" => can?(current_user, :update_issue, issue).to_s, "issuable-ref" => issue.to_reference }
data = {
endpoint: realtime_changes_namespace_project_issue_path(project.namespace, project, issue),
'can-update' => can?(current_user, :update_issue, issue).to_s,
'issuable-ref' => issue.to_reference || ''
}
updated_at_by = updated_at_by(issue)
data.merge(updated_at_by) if updated_at_by.present?
data.merge(updated_at_by)
end
end
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment