diff options
author | Luke "Jared" Bennett <lbennett@gitlab.com> | 2017-05-17 19:09:03 +0300 |
---|---|---|
committer | Luke "Jared" Bennett <lbennett@gitlab.com> | 2017-05-17 19:10:08 +0300 |
commit | dc857ab15020c5706405568d9a7d50a23f3e0459 (patch) | |
tree | 265765de8cf9b502b4fa4328259f691b78765223 /app/helpers | |
parent | 6dd88474bed70c2aa70c7fdf7ba6dbdc29dc8998 (diff) |
Added editable concern
Diffstat (limited to 'app/helpers')
-rw-r--r-- | app/helpers/application_helper.rb | 4 | ||||
-rw-r--r-- | app/helpers/editable_helper.rb | 5 |
2 files changed, 1 insertions, 8 deletions
diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index 16734fe4c75..8c74d36ad81 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -2,8 +2,6 @@ require 'digest/md5' require 'uri' module ApplicationHelper - include EditableHelper - # Check if a particular controller is the current one # # args - One or more controller names to check @@ -183,7 +181,7 @@ module ApplicationHelper end def edited_time_ago_with_tooltip(object, placement: 'top', html_class: 'time_ago', exclude_author: false) - return unless is_edited?(object) + return unless object.is_edited? content_tag :small, class: 'edited-text' do output = content_tag(:span, 'Edited ') diff --git a/app/helpers/editable_helper.rb b/app/helpers/editable_helper.rb deleted file mode 100644 index 78d9998b97e..00000000000 --- a/app/helpers/editable_helper.rb +++ /dev/null @@ -1,5 +0,0 @@ -module EditableHelper - def is_edited?(object) - !object.last_edited_at.blank? && object.last_edited_at != object.created_at - end -end |