Commit 53889603 by liyijie

use send_file instead of url

parent 9a8b6530
...@@ -53,8 +53,8 @@ class SimpleController::BaseController < ::InheritedResources::Base ...@@ -53,8 +53,8 @@ class SimpleController::BaseController < ::InheritedResources::Base
end end
def export def export
url = exportable_class.export_xlsx collection, **params.to_unsafe_h.symbolize_keys path = exportable_class.export_xlsx collection, **params.to_unsafe_h.symbolize_keys
render json: { url: url }, status: 201 send_file path
end end
def batch_destroy def batch_destroy
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment