Skip to content

Instantly share code, notes, and snippets.

@kylefox
Created December 1, 2009 23:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kylefox/246747 to your computer and use it in GitHub Desktop.
Save kylefox/246747 to your computer and use it in GitHub Desktop.
def create
@upload = FileUpload.new(:site_id => @current_site.id, :upload => params[:Filedata])
if @upload.save
render :partial => 'file_upload', :object => @upload
else
render :text => @upload.errors.join(", "), :status => :invalid
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment