diff --git a/lib/simple_form/components/errors.rb b/lib/simple_form/components/errors.rb index c6d26a1e..9bd88ecc 100644 --- a/lib/simple_form/components/errors.rb +++ b/lib/simple_form/components/errors.rb @@ -12,11 +12,7 @@ module SimpleForm protected def error_text - if options[:error_prefix] - options[:error_prefix] + " " + errors.send(error_method) - else - errors.send(error_method) - end + "#{options[:error_prefix]} #{errors.send(error_method)}".lstrip end def error_method