diff options
author | Phil Hughes <me@iamphill.com> | 2016-10-12 14:50:47 +0300 |
---|---|---|
committer | Phil Hughes <me@iamphill.com> | 2016-10-12 14:50:47 +0300 |
commit | f76f569bb87803b14c763427fc2875cca7dda892 (patch) | |
tree | 36323b0f248a57bae612ec1c5a5487ed98d120a5 /app/helpers/boards_helper.rb | |
parent | 53b3c62e0f889d077ee5b19703c3e04384c85c03 (diff) |
Moved data attribute values into helper method
Diffstat (limited to 'app/helpers/boards_helper.rb')
-rw-r--r-- | app/helpers/boards_helper.rb | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/app/helpers/boards_helper.rb b/app/helpers/boards_helper.rb new file mode 100644 index 00000000000..b7247ffa8b2 --- /dev/null +++ b/app/helpers/boards_helper.rb @@ -0,0 +1,12 @@ +module BoardsHelper + def board_data + board = @board || @boards.first + + { + endpoint: namespace_project_boards_path(@project.namespace, @project), + board_id: board.id, + disabled: !can?(current_user, :admin_list, @project), + issue_link_base: namespace_project_issues_path(@project.namespace, @project) + } + end +end |