[Misc] Fix redis/keyword param deprecation warning

This commit is contained in:
Earlopain 2022-03-21 16:19:05 +01:00
parent d4d37a7cd2
commit bf761e9352
No known key found for this signature in database
GPG Key ID: 6CFB948E15246897
2 changed files with 5 additions and 5 deletions

View File

@ -90,9 +90,9 @@ module ApplicationHelper
def format_text(text, **options)
# preserve the currrent inline behaviour
if options[:inline]
dtext_ragel(text, options)
dtext_ragel(text, **options)
else
raw %(<div class="styled-dtext">#{dtext_ragel(text, options)}</div>)
raw %(<div class="styled-dtext">#{dtext_ragel(text, **options)}</div>)
end
end

View File

@ -47,9 +47,9 @@ class UserThrottle
def hit!
t = Time.now
ckey = current_key(t)
redis_client.multi do
redis_client.incr(ckey)
redis_client.expire(ckey, cache_duration.minutes)
redis_client.multi do |transaction|
transaction.incr(ckey)
transaction.expire(ckey, cache_duration.minutes)
end
end