ruby - Download Blob file in Rails App is shown inline and not attached -


i blob function in oracle datenbank. users of rails app should able download these blob. problem is, after clicking on download, blob file shown inline in browser, should download file.

link:

= link_to export_pldw_plausibility_path, :class => "btn btn-primary      action-button"     %span.glyphicon.glyphicon-pencil     %span.hidden-xs = "export" 

route:

resources :pldw_plausibilities   'export', on: :member end 

controller:

def export   send_data pldwplausibility.export(params[:id]), :filename => "test.blob",     :disposition => 'attachment' end 

model:

def self.export(id)   return plsql.pld.pld_mdc.exportmdoc('pld_plausibility', id.to_i) end 

screenshot

sorry!

adding :target => "_blank" link solves problem..


Comments

Popular posts from this blog

Is there a better way to structure post methods in Class Based Views -

performance - Why is XCHG reg, reg a 3 micro-op instruction on modern Intel architectures? -

jquery - Responsive Navbar with Sub Navbar -