This commit is contained in:
2025-07-02 01:51:23 +09:00
parent 7af66db498
commit e211d0ff52
6 changed files with 51 additions and 1 deletions
+1 -1
View File
@@ -44,7 +44,7 @@ class PostsController < ApplicationController
# TODO: URL が正規のものがチェック,不正ならエラー
title = params[:title]
post = Post.new(title: title, url: params[:url], thumbnail_base: '', uploaded_user: current_user)
post = Post.new(title:, url: params[:url], thumbnail_base: '', uploaded_user: current_user)
post.thumbnail.attach(params[:thumbnail])
if post.save
post.resized_thumbnail!