summaryrefslogtreecommitdiffstats
path: root/app/controllers/versions_controller.rb
diff options
context:
space:
mode:
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