Class: SimpleForm::ErrorNotification
- Inherits:
-
Object
- Object
- SimpleForm::ErrorNotification
- Defined in:
- lib/simple_form/error_notification.rb
Instance Method Summary collapse
-
#initialize(builder, options) ⇒ ErrorNotification
constructor
A new instance of ErrorNotification.
- #render ⇒ Object
Constructor Details
#initialize(builder, options) ⇒ ErrorNotification
Returns a new instance of ErrorNotification.
5 6 7 8 9 |
# File 'lib/simple_form/error_notification.rb', line 5 def initialize(builder, ) @builder = builder @message = .delete(:message) @options = end |
Instance Method Details
#render ⇒ Object
11 12 13 14 15 |
# File 'lib/simple_form/error_notification.rb', line 11 def render if has_errors? template.content_tag(error_notification_tag, , ) end end |