Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.
def save_attachment @program = @object @attachment = Attachment.new if request.post? && params[:attachment] @attachment = @program.attachments.build(params[:attachment]) @attachment.name = @attachment.filename if @attachment.name.blank? result = false logger.silence do result = @attachment.save end if result update_event(@program.event) flash[:notice] = "Upload successful" redirect_to :controller => :main, :action => :show_event, :id => @program.event end end end
|Rails 3.2 directory to upload files||3||775|
|Ruby cannot load file problem||7||558|
|Help to install RubyGems and cucumber on window||2||310|
Join the community of 500,000 technology professionals and ask your questions.
Connect with top rated Experts
20 Experts available now in Live!