This one needs a nice test
This commit is contained in:
Reinier Balt 2008-08-18 16:02:13 +02:00
parent 2a6b8f1cd9
commit b2e82ea6b6
9 changed files with 38 additions and 3 deletions

View file

@ -83,10 +83,14 @@ class ContextsController < ApplicationController
end
@context.attributes = params["context"]
if @context.save
if params['wants_render']
if boolean_param('wants_render')
respond_to do |format|
format.js
end
elsif boolean_param('update_context_name')
@contexts = current_user.projects
render :template => 'contexts/update_context_name.js.rjs'
return
else
render :text => success_text || 'Success'
end