app/helpers/proclaim/posts_helper.rb in proclaim-0.4.0 vs app/helpers/proclaim/posts_helper.rb in proclaim-0.5.0

- old
+ new

@@ -1,4 +1,11 @@ module Proclaim module PostsHelper + def fake_form_field(post, attribute, &block) + if post.errors.any? and not post.errors[attribute].blank? + content_tag :div, block.call, class: "field_with_errors" + else + block.call + end + end end end