Aktywny rekord Rails, aby pobrać tylko listę identyfikatorów
Language.where(short_code: short_codes.flatten).pluck(:id)
Disgusted Dove
Language.where(short_code: short_codes.flatten).pluck(:id)