OSDN Git Service

refs #1587 TSVダウンロード: ダウンロード処理に失敗していたので修正
authorYOSHIDA Hiroki <hyoshida@appirits.com>
Thu, 16 May 2013 03:18:14 +0000 (12:18 +0900)
committerYOSHIDA Hiroki <hyoshida@appirits.com>
Thu, 16 May 2013 03:20:23 +0000 (12:20 +0900)
app/controllers/admin/base_controller.rb
app/controllers/application_controller.rb

index 79d8821..b7d7052 100644 (file)
@@ -30,15 +30,6 @@ class Admin::BaseController < ApplicationController
     @record.save
   end
 
-  def send_csv(text, filename)
-    send_data(
-      text,
-      type: "application/octet-stream; name=#{filename}; charset=shift_jis; header=present",
-      disposition: 'attachment',
-      filename: filename
-    )
-  end
-
   private
 
   def get_model(model_name = nil)
index cac9d0d..fbf05f5 100644 (file)
@@ -43,6 +43,14 @@ class ApplicationController < ActionController::Base
     end
   end
 
+  def send_csv(text, filename)
+    send_data(
+      text,
+      type: "application/octet-stream; name=#{filename}; charset=shift_jis; header=present",
+      disposition: 'attachment',
+      filename: filename
+    )
+  end
   private
   #sslの有効無効をuse_sslで決定する
   def ensure_proper_protocol