Replace deprecated update_attributes with update.
https://rubyinrails.com/2019/04/09/rails-6-1-activerecord-deprecates-update-attributes-methods/ DEPRECATION WARNING: update_attributes! is deprecated and will be removed from Rails 6.1 (please, use update! instead)
This commit is contained in:
@@ -176,13 +176,7 @@ class WikiPage < ApplicationRecord
|
||||
|
||||
def merge_version
|
||||
prev = versions.last
|
||||
prev.update_attributes(
|
||||
:title => title,
|
||||
:body => body,
|
||||
:is_locked => is_locked,
|
||||
:is_deleted => is_deleted,
|
||||
:other_names => other_names
|
||||
)
|
||||
prev.update(title: title, body: body, is_locked: is_locked, is_deleted: is_deleted, other_names: other_names)
|
||||
end
|
||||
|
||||
def merge_version?
|
||||
|
||||
Reference in New Issue
Block a user