teratail header banner
teratail header banner
質問するログイン新規登録

質問編集履歴

1

コードにコメント追記

2017/04/10 14:50

投稿

philomagi
philomagi

スコア267

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),