diff --git a/lib/simple_form/form_builder.rb b/lib/simple_form/form_builder.rb index da723cb7..d7cf621b 100644 --- a/lib/simple_form/form_builder.rb +++ b/lib/simple_form/form_builder.rb @@ -676,7 +676,7 @@ def attempt_mapping(mapping, at) begin at.const_get(mapping) rescue NameError => e - raise if e.message !~ /#{mapping}$/ + raise unless e.message.include?(mapping) end end