Guest User

Untitled

a guest
Jan 21st, 2018
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.46 KB | None | 0 0
  1. module Specialists::UsersHelper
  2. def check_for_errors(field_error, &block)
  3. if field_error.blank?
  4. block.call
  5. else
  6. haml_tag :div, :class => 'field_with_errors' do
  7. block.call
  8. end
  9. end
  10. end
  11.  
  12. def simple_form_errors_message(errors)
  13. if !errors.empty?
  14. haml_tag :div, :class => 'errorExplanation' do
  15. haml_tag :p do
  16. haml_concat "Please correct the highlighted fields."
  17. end
  18. end
  19. end
  20. end
  21. end
Add Comment
Please, Sign In to add comment