プロジェクト

全般

プロフィール

« | » 

リビジョン cb1e9b75

chiastolite さんが12年以上前に追加

using PUT method when editing category

差分を表示:

app/controllers/term_categories_controller.rb
def edit
@category = TermCategory.find(:first, :conditions => "project_id = #{@project.id} and id = #{params[:category_id]}")
if request.post? and @category.update_attributes(params[:category])
if request.put? and @category.update_attributes(params[:category])
flash[:notice] = l(:notice_successful_update)
redirect_to :controller => 'term_categories', :action => 'index', :project_id => @project
end

他の形式にエクスポート: Unified diff