summaryrefslogtreecommitdiffstats
path: root/app/controllers/versions_controller.rb
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2011-12-03 09:12:51 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2011-12-03 09:12:51 +0000
commit8bbb5d9686fb5e3d7c00e097f9cbcff17cb22c1a (patch)
tree2006dd82a75b7cb6c5facdec0fe5de04a31c93a0 /app/controllers/versions_controller.rb
parent666830cca019d9950e9361cb4f058fb9c0cac650 (diff)
downloadredmine-8bbb5d9686fb5e3d7c00e097f9cbcff17cb22c1a.tar.gz
redmine-8bbb5d9686fb5e3d7c00e097f9cbcff17cb22c1a.zip
Tests/cleanup VersionsController.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@8038 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/controllers/versions_controller.rb')
-rw-r--r--app/controllers/versions_controller.rb8
1 files changed, 1 insertions, 7 deletions
diff --git a/app/controllers/versions_controller.rb b/app/controllers/versions_controller.rb
index ed61fbb06..3aac97943 100644
--- a/app/controllers/versions_controller.rb
+++ b/app/controllers/versions_controller.rb
@@ -71,16 +71,10 @@ class VersionsController < ApplicationController
end
def new
- @version = @project.versions.build
- if params[:version]
- attributes = params[:version].dup
- attributes.delete('sharing') unless attributes.nil? || @version.allowed_sharings.include?(attributes['sharing'])
- @version.attributes = attributes
- end
+ @version = @project.versions.build(params[:version])
end
def create
- # TODO: refactor with code above in #new
@version = @project.versions.build
if params[:version]
attributes = params[:version].dup