Refactoring TasksHelper

This commit is contained in:
Douglas Barbosa Alexandre 2016-02-20 10:33:46 -02:00
parent d80678c0da
commit a7dee0ab01
2 changed files with 2 additions and 9 deletions

View file

@ -24,9 +24,7 @@ module TasksHelper
end end
def task_target_link_html(task) def task_target_link_html(task)
link_to task_target_path(task) do link_to "##{task.target_iid}", task_target_path(task)
"##{task.target_iid}"
end
end end
def task_target_path(task) def task_target_path(task)
@ -36,11 +34,6 @@ module TasksHelper
task.project, task.target], anchor: anchor) task.project, task.target], anchor: anchor)
end 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 def task_actions_options
actions = [ actions = [
OpenStruct.new(id: '', title: 'Any Action'), OpenStruct.new(id: '', title: 'Any Action'),

View file

@ -18,4 +18,4 @@
.task-body .task-body
.task-note .task-note
.md .md
= task_body(task.body, project: task.project) = event_note(task.body, project: task.project)