Skip to content

Instantly share code, notes, and snippets.

@tghastings
Created April 30, 2012 19:54
Show Gist options
  • Save tghastings/2562214 to your computer and use it in GitHub Desktop.
Save tghastings/2562214 to your computer and use it in GitHub Desktop.
def update
@project = Project.find(params[:id])
@project.update_attributes!(params[:project])
format.html {
if request.xhr?
# *** repond with the new value ***
render :text => params[:project].values.first
else
redirect_to(@project, :notice => 'User was successfully updated.')
end
}
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment