diff options
author | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2013-01-07 22:48:57 +0400 |
---|---|---|
committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2013-01-07 22:52:43 +0400 |
commit | cc64f2a814802abe9ae3bb8297079b643c8774df (patch) | |
tree | 5eb20bceb48b9f81093e8734907fe4c9f7b40ada /app/helpers/groups_helper.rb | |
parent | 0a1603992490d47b3fe676a02dedb5417603a1f2 (diff) |
Common filtering for dashboard and group. Share partial search result partial
Diffstat (limited to 'app/helpers/groups_helper.rb')
-rw-r--r-- | app/helpers/groups_helper.rb | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/app/helpers/groups_helper.rb b/app/helpers/groups_helper.rb new file mode 100644 index 00000000000..283119bc24c --- /dev/null +++ b/app/helpers/groups_helper.rb @@ -0,0 +1,17 @@ +module GroupsHelper + def group_filter_path(entity, options={}) + exist_opts = { + status: params[:status], + project_id: params[:project_id], + } + + options = exist_opts.merge(options) + + case entity + when 'issue' then + issues_group_path(@group, options) + when 'merge_request' + merge_requests_group_path(@group, options) + end + end +end |