diff options
author | Eric Davis <edavis@littlestreamsoftware.com> | 2010-02-24 17:21:41 +0000 |
---|---|---|
committer | Eric Davis <edavis@littlestreamsoftware.com> | 2010-02-24 17:21:41 +0000 |
commit | d581510af605dc25662a5fa8af936b7b4ea35a2b (patch) | |
tree | e1378a5c0af03a7d3c8746947f32bf65d0e40261 /app | |
parent | 6ed9734cb99f71300a0d9fdf4121cd797102f645 (diff) | |
download | redmine-d581510af605dc25662a5fa8af936b7b4ea35a2b.tar.gz redmine-d581510af605dc25662a5fa8af936b7b4ea35a2b.zip |
Refactor: Start to extract IssuesController#edit into #update (REST).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@3480 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app')
-rw-r--r-- | app/controllers/issues_controller.rb | 11 | ||||
-rw-r--r-- | app/views/issues/_edit.rhtml | 3 |
2 files changed, 11 insertions, 3 deletions
diff --git a/app/controllers/issues_controller.rb b/app/controllers/issues_controller.rb index accfae33c..827186d89 100644 --- a/app/controllers/issues_controller.rb +++ b/app/controllers/issues_controller.rb @@ -19,7 +19,7 @@ class IssuesController < ApplicationController menu_item :new_issue, :only => :new default_search_scope :issues - before_filter :find_issue, :only => [:show, :edit, :reply] + before_filter :find_issue, :only => [:show, :edit, :update, :reply] before_filter :find_issues, :only => [:bulk_edit, :move, :destroy] before_filter :find_project, :only => [:new, :update_form, :preview] before_filter :authorize, :except => [:index, :changes, :gantt, :calendar, :preview, :context_menu] @@ -226,7 +226,7 @@ class IssuesController < ApplicationController end # failure respond_to do |format| - format.html { } + format.html { render :action => 'edit' } format.xml { render :xml => @issue.errors, :status => :unprocessable_entity } end end @@ -237,6 +237,13 @@ class IssuesController < ApplicationController attachments.each(&:destroy) end + #-- + # Start converting to the Rails REST controllers + #++ + def update + edit + end + def reply journal = Journal.find(params[:journal_id]) if params[:journal_id] if journal diff --git a/app/views/issues/_edit.rhtml b/app/views/issues/_edit.rhtml index 413f21729..50a187410 100644 --- a/app/views/issues/_edit.rhtml +++ b/app/views/issues/_edit.rhtml @@ -1,7 +1,8 @@ <% labelled_tabular_form_for :issue, @issue, - :url => {:action => 'edit', :id => @issue}, + :url => {:action => 'update', :id => @issue}, :html => {:id => 'issue-form', :class => nil, + :method => :put, :multipart => true} do |f| %> <%= error_messages_for 'issue' %> <%= error_messages_for 'time_entry' %> |