some refactoring
This commit is contained in:
parent
dc8c0dc374
commit
02ab9ae68a
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue