Method: SimpleModel::ErrorHelpers#puralize_errors_string
- Defined in:
- lib/simple_model/error_helpers.rb
#puralize_errors_string(array) ⇒ Object
66 67 68 69 70 71 |
# File 'lib/simple_model/error_helpers.rb', line 66 def puralize_errors_string(array) array = array.to_a if array.is_a?(ActiveModel::Errors) s = "error" s << "s" if array.length > 1 s end |