LoginSignup
0
0

More than 3 years have passed since last update.

画像がアップデートされない。。

Posted at

refile(Gem)を使って画像投稿をしていて、
マイページでプロフィール画像の編集できるようにしたが、
なぜか画像が更新されない。

editアクション、updateアクションもやっている。

def edit
    @user = User.find(params[:id])
end

def update
  @user = User.find(params[:id])
  @user.update(user_params)
  redirect_to user_path(@user.id)
end

viewもこんな感じ

<%= attachment_image_tag @user, :profile_image, :fill, 60, 60, class: "img-circle pull-left profile-thumb", fallback: "no_image.jpg"%>

環境

・docker
・Rails

試したこと

・ブラウザにキャッシュされているのかな?と思いキャッシュを削除。
・fillの部分をsizeに変更してみましたが出来ない。

解決

docker-compose runをしてみたら、なぜか出来た。

⇨新しいコンテナが作られたからかな?
⇨最初、docker-copose up -d で放置していて、それから新しいコンテナを作っていなかったから?
⇨まだ頭のモヤモヤが。。。

とりあえず、解決したので、進みます。もやもやがありますが、、、

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0