Skip to content

Commit 2733c15

Browse files
committed
switch to new+save pair when creating PinnedLinks
1 parent d2c6d41 commit 2733c15

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

app/controllers/pinned_links_controller.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,9 @@ def new
2727
end
2828

2929
def create
30-
@link = PinnedLink.create(pinned_link_params)
30+
@link = PinnedLink.new(pinned_link_params)
3131

32-
if @link.valid?
32+
if @link.save
3333
attr = @link.attributes_print
3434

3535
AuditLog.moderator_audit(event_type: 'pinned_link_create',

0 commit comments

Comments
 (0)