Skip to content
Snippets Groups Projects
Commit 8dc19494 authored by Long Nguyen's avatar Long Nguyen
Browse files

Remove unused code, update spec, and update changelog

parent c0f02aad
No related branches found
No related tags found
No related merge requests found
Please view this file on the master branch, on stable branches it's out of date.
 
v 8.8.0 (unreleased)
- Snippets tab under user profile. !4001 (Long Nguyen)
- Remove future dates from contribution calendar graph.
- Fix error when visiting commit builds page before build was updated
- Add 'l' shortcut to open Label dropdown on issuables and 'i' to create new issue on a project
Loading
Loading
Loading
Loading
@@ -10,29 +10,11 @@ class SnippetsController < ApplicationController
# Allow destroy snippet
before_action :authorize_admin_snippet!, only: [:destroy]
 
skip_before_action :authenticate_user!, only: [:index, :user_index, :show, :raw]
skip_before_action :authenticate_user!, only: [:show, :raw]
 
layout 'snippets'
respond_to :html
 
def index
if params[:username].present?
@user = User.find_by(username: params[:username])
render_404 and return unless @user
@snippets = SnippetsFinder.new.execute(current_user, {
filter: :by_user,
user: @user,
scope: params[:scope] }).
page(params[:page])
render 'index'
else
redirect_to(current_user ? dashboard_snippets_path : explore_snippets_path)
end
end
def new
@snippet = PersonalSnippet.new
end
Loading
Loading
Loading
Loading
@@ -27,18 +27,10 @@ end
# PUT /snippets/:id(.:format) snippets#update
# DELETE /snippets/:id(.:format) snippets#destroy
describe SnippetsController, "routing" do
it "to #user_index" do
expect(get("/s/User")).to route_to('snippets#index', username: 'User')
end
it "to #raw" do
expect(get("/snippets/1/raw")).to route_to('snippets#raw', id: '1')
end
 
it "to #index" do
expect(get("/snippets")).to route_to('snippets#index')
end
it "to #create" do
expect(post("/snippets")).to route_to('snippets#create')
end
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment