lib/simple_model/errors.rb in simple_model-0.1.2 vs lib/simple_model/errors.rb in simple_model-0.1.3
- old
+ new
@@ -36,10 +36,10 @@
def validate
# Override to implement validation
end
def errors_for_flash
- error_string = ""
+ error_string = "<div id='smErrorExplanation'>#{errors.count} errors prevented saving.</div>"
errors.full_messages.each do |m|
error_string << "<div>#{m}</div>"
end
error_string
end