Module: ModelErrorMessages::Helpers

Includes:
ActionView::Helpers::TagHelper
Defined in:
lib/model_error_messages/helpers.rb

Instance Method Summary collapse

Instance Method Details

#model_error_messages(model, options = {}) ⇒ Object



5
6
7
8
9
10
# File 'lib/model_error_messages/helpers.rb', line 5

def model_error_messages(model, options = {})
  return '' if model.nil?
  return '' if model.errors.full_messages.empty?
  config = local_config(options)
  errors_wrapper(model, config)
end