summaryrefslogtreecommitdiffstats
path: root/app
diff options
context:
space:
mode:
authorEric Davis <edavis@littlestreamsoftware.com>2010-09-15 16:50:25 +0000
committerEric Davis <edavis@littlestreamsoftware.com>2010-09-15 16:50:25 +0000
commitbe6e0927f3ce95e751bd3c6f4a61de6979898012 (patch)
treea71c41d3f1f19ef60418f945fcb70494a39a516c /app
parentcdfc57d5442f72d62437f52af480049c943ecbf8 (diff)
downloadredmine-be6e0927f3ce95e751bd3c6f4a61de6979898012.tar.gz
redmine-be6e0927f3ce95e751bd3c6f4a61de6979898012.zip
Refactor: Split VersionsController#edit into #edit and #update
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4088 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app')
-rw-r--r--app/controllers/versions_controller.rb5
-rw-r--r--app/views/versions/edit.rhtml2
2 files changed, 5 insertions, 2 deletions
diff --git a/app/controllers/versions_controller.rb b/app/controllers/versions_controller.rb
index dd01da95b..96c240c50 100644
--- a/app/controllers/versions_controller.rb
+++ b/app/controllers/versions_controller.rb
@@ -87,8 +87,11 @@ class VersionsController < ApplicationController
end
end
end
-
+
def edit
+ end
+
+ def update
if request.post? && params[:version]
attributes = params[:version].dup
attributes.delete('sharing') unless @version.allowed_sharings.include?(attributes['sharing'])
diff --git a/app/views/versions/edit.rhtml b/app/views/versions/edit.rhtml
index 1556ebba1..8c437eb5e 100644
--- a/app/views/versions/edit.rhtml
+++ b/app/views/versions/edit.rhtml
@@ -1,6 +1,6 @@
<h2><%=l(:label_version)%></h2>
-<% labelled_tabular_form_for :version, @version, :url => { :action => 'edit' } do |f| %>
+<% labelled_tabular_form_for :version, @version, :url => { :action => 'update', :id => @version } do |f| %>
<%= render :partial => 'form', :locals => { :f => f } %>
<%= submit_tag l(:button_save) %>
<% end %>