Fix reference to weapon series

This commit is contained in:
Justin Edmund 2023-01-03 02:41:30 -08:00
parent a36605bce7
commit 5e4cb4fe2b

View file

@ -42,7 +42,7 @@ class GridWeapon < ApplicationRecord
# Validates whether the weapon can be added to the desired position
def compatible_with_position
return unless [9, 10, 11].include?(position.to_i) && ![11, 16, 17, 28, 29].include?(series)
return unless [9, 10, 11].include?(position.to_i) && ![11, 16, 17, 28, 29].include?(weapon.series)
errors.add(:series, 'must be compatible with position')
end