Displaying 2 results from an estimated 2 matches for "attachments_control".
2007 Sep 21
1
generating nested resource path
I have a nested resourced called attachments:
(routes.rb)
map.resources :content_campaigns do |content_campaigns|
content_campaigns.resources :attachments, :member => { :download
=> :get}
end
But, I can''t seem to generate the new path after I create a new
attachment:
(attachments_controller.rb)
format.xml { head :created, :location =>
attachment_url(@attachment) }
I get this trace:
ActionController::RoutingError (attachment_url failed to generate from
{:action=>"show", :content_campaign_id=>"7", :controller=>"attachments"},
expected: {:...
2011 Jul 07
0
Question of uploading large file using carrierwave, uploadify and nginx upload module
...he uploadify has finished uploading
files and onAllComplete function will have to execute, however, the
saving object takes much longer time and return late, and the
javascript terminate prematurely, and issues a IO error. In fact, the
file is successfully uploaded and placed in the correct place.
attachments_controller
def create
@attachment = Attachment.new(:fast_asset => params[:fast_asset])
if @attachment.save # the line takes long time to finish
render :nothing => true
else
render ''new''
end
end
attachment model
class Attachment < ActiveRecord::B...