projects
/
arvados.git
/ blobdiff
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
20300: Change deprecated update_attributes to update.
[arvados.git]
/
services
/
api
/
lib
/
trashable.rb
diff --git
a/services/api/lib/trashable.rb
b/services/api/lib/trashable.rb
index f7faabc4c262c990ee20ee60a9cdc829b1bf8214..50611c305ded5d1d166914b1066f6d348a2af51b 100644
(file)
--- a/
services/api/lib/trashable.rb
+++ b/
services/api/lib/trashable.rb
@@
-65,7
+65,7
@@
module Trashable
earliest_delete = [
@validation_timestamp,
trash_at_was,
earliest_delete = [
@validation_timestamp,
trash_at_was,
- ].compact.min + Rails.configuration.Collections.BlobSigningTTL
.seconds
+ ].compact.min + Rails.configuration.Collections.BlobSigningTTL
# The previous value of delete_at is also an upper bound on the
# longest-lived permission token. For example, if TTL=14,
# The previous value of delete_at is also an upper bound on the
# longest-lived permission token. For example, if TTL=14,
@@
-93,19
+93,19
@@
end
module TrashableController
def destroy
if !@object.is_trashed
module TrashableController
def destroy
if !@object.is_trashed
- @object.update
_attributes
!(trash_at: db_current_time)
+ @object.update!(trash_at: db_current_time)
end
earliest_delete = (@object.trash_at +
end
earliest_delete = (@object.trash_at +
- Rails.configuration.Collections.BlobSigningTTL
.seconds
)
+ Rails.configuration.Collections.BlobSigningTTL)
if @object.delete_at > earliest_delete
if @object.delete_at > earliest_delete
- @object.update
_attributes
!(delete_at: earliest_delete)
+ @object.update!(delete_at: earliest_delete)
end
show
end
def trash
if !@object.is_trashed
end
show
end
def trash
if !@object.is_trashed
- @object.update
_attributes
!(trash_at: db_current_time)
+ @object.update!(trash_at: db_current_time)
end
show
end
end
show
end