This commit is contained in:
@@ -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!
|
||||
|
||||
Reference in New Issue
Block a user