From 02ab9ae68a0dc841f23d4f13db8caa1f3058f2df Mon Sep 17 00:00:00 2001 From: Vasiliy Ermolovich Date: Sun, 11 Dec 2011 19:26:41 +0300 Subject: [PATCH] some refactoring --- lib/simple_form/components/errors.rb | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) 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