Object
# File lib/simple_form/error_notification.rb, line 19 def error_message @message || translate_error_notification end
# File lib/simple_form/error_notification.rb, line 23 def error_notification_tag SimpleForm.error_notification_tag end
# File lib/simple_form/error_notification.rb, line 27 def has_errors? object && object.respond_to?(:errors) && object.errors.present? end
# File lib/simple_form/error_notification.rb, line 31 def html_options @options[:class] = "error_notification #{@options[:class]}".strip @options end
# File lib/simple_form/error_notification.rb, line 36 def translate_error_notification lookups = [] lookups << :"#{object_name}" lookups << :default_message lookups << "Some errors were found, please take a look:" I18n.t(lookups.shift, :scope => :"simple_form.error_notification", :default => lookups) end
Generated with the Darkfish Rdoc Generator 2.