質問編集履歴
1
コードにコメント追記
title
CHANGED
File without changes
|
body
CHANGED
@@ -8,6 +8,7 @@
|
|
8
8
|
class XxxController < ApplicationController
|
9
9
|
def by_index
|
10
10
|
index = params[:index]
|
11
|
+
# pictureテーブルのpictureカラムにbase64エンコードした画像が入っている
|
11
12
|
picture = Picture.find_by(index: index).picture
|
12
13
|
|
13
14
|
send_data ::Base64.decode64(picture),
|