Skip to content

Instantly share code, notes, and snippets.

@meltzerj
Created April 22, 2011 08:35
Show Gist options
  • Select an option

  • Save meltzerj/936278 to your computer and use it in GitHub Desktop.

Select an option

Save meltzerj/936278 to your computer and use it in GitHub Desktop.
def update
@video = current_user.videos.find(params[:id])
respond_to do |format|
if @video.update_attributes(params[:video])
format.html { redirect_to(@video) }
format.js
else
format.html { render :action => "edit" }
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment