Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDouwe Maan <douwe@gitlab.com>2015-09-08 16:49:20 +0300
committerDouwe Maan <douwe@gitlab.com>2015-09-08 16:49:20 +0300
commit5d785457db3017a17722314a52433543dd925164 (patch)
treea030699b752fcd1f161118be70a9df0f625fa0ef /app/controllers/dashboard/snippets_controller.rb
parent260fcd45209b59ace6b3fd6dcca6c32c2c75a8f1 (diff)
Clean up overlap between dashboard and explore.
- Split up SnippetsController into separate dashboard and explore sections. - Use consistent page titles, header titles and sidebars between dashboard and explore sections when signed in or not.
Diffstat (limited to 'app/controllers/dashboard/snippets_controller.rb')
-rw-r--r--app/controllers/dashboard/snippets_controller.rb10
1 files changed, 10 insertions, 0 deletions
diff --git a/app/controllers/dashboard/snippets_controller.rb b/app/controllers/dashboard/snippets_controller.rb
new file mode 100644
index 00000000000..f4354c6d8ca
--- /dev/null
+++ b/app/controllers/dashboard/snippets_controller.rb
@@ -0,0 +1,10 @@
+class Dashboard::SnippetsController < Dashboard::ApplicationController
+ def index
+ @snippets = SnippetsFinder.new.execute(current_user,
+ filter: :by_user,
+ user: current_user,
+ scope: params[:scope]
+ )
+ @snippets = @snippets.page(params[:page]).per(PER_PAGE)
+ end
+end