Skip to content

Commit

Permalink
Fix stale module
Browse files Browse the repository at this point in the history
  • Loading branch information
mayorova committed Nov 21, 2024
1 parent 77a1734 commit 6ce6fa6
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion app/lib/stale.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ module Stale
# In such cases the object will always be considered stale
def stale?(object = nil, **freshness_kwargs)
has_updated_at = object.respond_to?(:updated_at) || object&.all? { _1.respond_to? :updated_at }
super if has_updated_at
return super if has_updated_at

true
end
end

0 comments on commit 6ce6fa6

Please sign in to comment.