Fix ruby warnings about deprecated keyword arguments.

This commit is contained in:
evazion
2021-01-11 05:06:38 -06:00
parent 95f39afcd9
commit 1e7a5ba49d
12 changed files with 22 additions and 23 deletions

View File

@@ -71,7 +71,7 @@ class PostEvent
end
# XXX can't use hidden_attributes because we don't inherit from ApplicationRecord.
def serializable_hash(**options)
def serializable_hash(options = {})
hash = super
hash = hash.except(:creator_id) unless is_creator_visible?
hash

View File

@@ -150,7 +150,7 @@ class SavedSearch < ApplicationRecord
end
def normalized_query
PostQueryBuilder.new(query).normalized_query.to_s
@normalized_query ||= PostQueryBuilder.new(query).normalized_query.to_s
end
def rewrite_query(old_name, new_name)