Api CSV exports

This commit is contained in:
2018-01-05 06:23:51 -03:00
parent 659da24af3
commit ba73f07a71
+1 -1
View File
@@ -6,7 +6,7 @@ module Dunlop::Ember::ApiBaseController
before_action :authenticate_user! before_action :authenticate_user!
before_action :set_current_user before_action :set_current_user
before_action :find_record, only: %i[show update destroy] before_action :find_record, only: %i[show update destroy]
respond_to :json respond_to :json, :csv
rescue_from CanCan::AccessDenied do rescue_from CanCan::AccessDenied do
render json: {errors: [{status: 403, detail: 'unauthorized'}]}, status: 403 render json: {errors: [{status: 403, detail: 'unauthorized'}]}, status: 403
end end