diff options
author | Luke "Jared" Bennett <lbennett@gitlab.com> | 2017-05-31 11:10:33 +0100 |
---|---|---|
committer | Luke "Jared" Bennett <lbennett@gitlab.com> | 2017-05-31 11:35:05 +0100 |
commit | 632d0c0a4c6ed8dd099f67a6914868811490e6a4 (patch) | |
tree | 8383fdad472c575fa8d04a5915e86709ff205498 /app | |
parent | 33d66a47f6da19831889d8717ec9f11b8b5c6b6c (diff) | |
download | gitlab-ce-632d0c0a4c6ed8dd099f67a6914868811490e6a4.tar.gz |
Remove EditableHelper and move method to IssuablesHelper
Diffstat (limited to 'app')
-rw-r--r-- | app/helpers/editable_helper.rb | 13 | ||||
-rw-r--r-- | app/helpers/issuables_helper.rb | 13 |
2 files changed, 12 insertions, 14 deletions
diff --git a/app/helpers/editable_helper.rb b/app/helpers/editable_helper.rb deleted file mode 100644 index ddb2fd22a35..00000000000 --- a/app/helpers/editable_helper.rb +++ /dev/null @@ -1,13 +0,0 @@ -module EditableHelper - def updated_at_by(editable) - return {} unless editable.is_edited? - - { - updated_at: editable.updated_at.to_time.iso8601, - updated_by: { - name: editable.last_edited_by.name, - path: user_path(editable.last_edited_by) - } - } - end -end diff --git a/app/helpers/issuables_helper.rb b/app/helpers/issuables_helper.rb index f995c86c059..afe19f017d7 100644 --- a/app/helpers/issuables_helper.rb +++ b/app/helpers/issuables_helper.rb @@ -1,6 +1,5 @@ module IssuablesHelper include GitlabRoutingHelper - include EditableHelper def sidebar_gutter_toggle_icon sidebar_gutter_collapsed? ? icon('angle-double-left', { 'aria-hidden': 'true' }) : icon('angle-double-right', { 'aria-hidden': 'true' }) @@ -285,4 +284,16 @@ module IssuablesHelper data.merge(updated_at_by) end + + def updated_at_by(issuable) + return {} unless issuable.is_edited? + + { + updated_at: issuable.updated_at.to_time.iso8601, + updated_by: { + name: issuable.last_edited_by.name, + path: user_path(issuable.last_edited_by) + } + } + end end |