Class: SimpleForm::ErrorNotification

Inherits:
Object
  • Object
show all
Defined in:
lib/simple_form/error_notification.rb

Instance Method Summary collapse

Constructor Details

#initialize(builder, options) ⇒ ErrorNotification

Returns a new instance of ErrorNotification.



6
7
8
9
10
# File 'lib/simple_form/error_notification.rb', line 6

def initialize(builder, options)
  @builder = builder
  @message = options.delete(:message)
  @options = options
end

Instance Method Details

#renderObject



12
13
14
15
16
# File 'lib/simple_form/error_notification.rb', line 12

def render
  if has_errors?
    template.(error_notification_tag, error_message, html_options)
  end
end