diff --git a/lib/friendly_id/mobility.rb b/lib/friendly_id/mobility.rb index 8aea174..6e46e3f 100644 --- a/lib/friendly_id/mobility.rb +++ b/lib/friendly_id/mobility.rb @@ -31,7 +31,7 @@ def friendly def advise_against_untranslated_model(model) field = model.friendly_id_config.query_field - if model.included_modules.grep(::Mobility::Translations).empty? || model.mobility_attributes.exclude?(field) + if model.included_modules.grep(::Mobility::Translations).empty? || model.mobility_attributes.exclude?(field.to_s) raise "[FriendlyId] You need to translate the '#{field}' field with " \ "Mobility (add 'translates :#{field}' in your model '#{model.name}')" end