Created
September 16, 2011 19:29
-
-
Save roykolak/1222913 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module Specialists::UsersHelper | |
def check_for_errors(field_error, &block) | |
if field_error.blank? | |
block.call | |
else | |
haml_tag :div, :class => 'field_with_errors' do | |
block.call | |
end | |
end | |
end | |
def simple_form_errors_message(errors) | |
if !errors.empty? | |
haml_tag :div, :class => 'errorExplanation' do | |
haml_tag :p do | |
haml_concat "Please correct the highlighted fields." | |
end | |
end | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment