Refactoring TasksHelper

parent d80678c0
......@@ -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'),
......
......@@ -18,4 +18,4 @@
.task-body
.task-note
.md
= task_body(task.body, project: task.project)
= event_note(task.body, project: task.project)
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