We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f417381 commit 50b691fCopy full SHA for 50b691f
1 file changed
app/controllers/posts_controller.rb
@@ -26,7 +26,7 @@ def create
26
end
27
28
def update
29
- if @post.update(post_params)
+ if @post.update(post_params.merge(updated_by_id: current_user.id))
30
redirect_to @post, notice: 'Post was successfully updated.'
31
else
32
render :edit
0 commit comments