You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In ActiveStorage::Attachment, the private method named_variants can return nil, but callers of this method do not guard against a nil value being returned.
In
ActiveStorage::Attachment
, the private method named_variants can returnnil
, but callers of this method do not guard against anil
value being returned.rails/activestorage/app/models/active_storage/attachment.rb
Lines 158 to 160 in bd04126
rails/activestorage/app/models/active_storage/attachment.rb
Line 135 in bd04126
Steps to reproduce
Expected behavior
No exception should get raised if there are no named variants.
Actual behavior
eval error: undefined method 'each' for nil
System configuration
Rails version:
Rails 7.1.3.3
Ruby version:
ruby 3.3.1 (2024-04-23 revision c56cd86388) [arm64-darwin23]
The text was updated successfully, but these errors were encountered: