diff options
author | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2015-02-27 13:01:57 -0800 |
---|---|---|
committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2015-02-27 13:01:57 -0800 |
commit | 0d22b75b03496ced3d783f8fee9584098602ea1c (patch) | |
tree | c7ddec6072c716fd63a8703f2dfeb0e4234a633f /app/controllers/projects/snippets_controller.rb | |
parent | 5f682094d9b7c985ad62ebe29664bb6fe87b54be (diff) | |
parent | d4aab6528cb80b0f41bdac2240dd9cc32543481d (diff) | |
download | gitlab-ce-0d22b75b03496ced3d783f8fee9584098602ea1c.tar.gz |
Merge branch 'master' into mmonaco/gitlab-ce-api-user-noconfirm
Conflicts:
lib/api/users.rb
Diffstat (limited to 'app/controllers/projects/snippets_controller.rb')
-rw-r--r-- | app/controllers/projects/snippets_controller.rb | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/app/controllers/projects/snippets_controller.rb b/app/controllers/projects/snippets_controller.rb index 9d5dd8a95cc..6c250e4ffed 100644 --- a/app/controllers/projects/snippets_controller.rb +++ b/app/controllers/projects/snippets_controller.rb @@ -32,7 +32,8 @@ class Projects::SnippetsController < Projects::ApplicationController @snippet.author = current_user if @snippet.save - redirect_to project_snippet_path(@project, @snippet) + redirect_to namespace_project_snippet_path(@project.namespace, @project, + @snippet) else respond_with(@snippet) end @@ -43,7 +44,7 @@ class Projects::SnippetsController < Projects::ApplicationController def update if @snippet.update_attributes(snippet_params) - redirect_to project_snippet_path(@project, @snippet) + redirect_to namespace_project_snippet_path(@project.namespace, @project, @snippet) else respond_with(@snippet) end @@ -60,7 +61,7 @@ class Projects::SnippetsController < Projects::ApplicationController @snippet.destroy - redirect_to project_snippets_path(@project) + redirect_to namespace_project_snippets_path(@project.namespace, @project) end def raw @@ -68,7 +69,7 @@ class Projects::SnippetsController < Projects::ApplicationController @snippet.content, type: 'text/plain; charset=utf-8', disposition: 'inline', - filename: @snippet.file_name + filename: @snippet.sanitized_file_name ) end |