summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDouglas Barbosa Alexandre <dbalexandre@gmail.com>2016-02-20 10:33:46 -0200
committerDouglas Barbosa Alexandre <dbalexandre@gmail.com>2016-02-20 12:12:05 -0200
commita7dee0ab018d8ce660d7ec778b68291ee3b3689b (patch)
tree22cb1f2d811aa5750362555372ab1eb4b7580016
parentd80678c0da431517498ddf54d3b439498177e696 (diff)
downloadgitlab-ce-a7dee0ab018d8ce660d7ec778b68291ee3b3689b.tar.gz
Refactoring TasksHelper
-rw-r--r--app/helpers/tasks_helper.rb9
-rw-r--r--app/views/dashboard/tasks/_task.html.haml2
2 files changed, 2 insertions, 9 deletions
diff --git a/app/helpers/tasks_helper.rb b/app/helpers/tasks_helper.rb
index d8e0780e4c1..4498cd3af25 100644
--- a/app/helpers/tasks_helper.rb
+++ b/app/helpers/tasks_helper.rb
@@ -24,9 +24,7 @@ module TasksHelper
end
def task_target_link_html(task)
- link_to task_target_path(task) do
- "##{task.target_iid}"
- end
+ link_to "##{task.target_iid}", task_target_path(task)
end
def task_target_path(task)
@@ -36,11 +34,6 @@ module TasksHelper
task.project, task.target], anchor: anchor)
end
- def task_body(text, options = {})
- text = first_line_in_markdown(text, 150, options)
- sanitize(text, tags: %w(a img b pre code p span))
- end
-
def task_actions_options
actions = [
OpenStruct.new(id: '', title: 'Any Action'),
diff --git a/app/views/dashboard/tasks/_task.html.haml b/app/views/dashboard/tasks/_task.html.haml
index d08b021f53b..164a53dd928 100644
--- a/app/views/dashboard/tasks/_task.html.haml
+++ b/app/views/dashboard/tasks/_task.html.haml
@@ -18,4 +18,4 @@
.task-body
.task-note
.md
- = task_body(task.body, project: task.project)
+ = event_note(task.body, project: task.project)