Skip to content

Instantly share code, notes, and snippets.

@faust45
Created April 6, 2010 08:23
Show Gist options
  • Select an option

  • Save faust45/357352 to your computer and use it in GitHub Desktop.

Select an option

Save faust45/357352 to your computer and use it in GitHub Desktop.
def create
@video = Video.new(params[:video])
if @video.save
@video.put_attachment('clip', params[:video][:file])
flash[:notice] = 'Video created succes!'
redirect_to admin_videos_path
else
flash[:notice] = 'Video created is fail!'
render :action => :new
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment