Module: Proclaim::PostsHelper
- Defined in:
- app/helpers/proclaim/posts_helper.rb
Instance Method Summary collapse
Instance Method Details
#fake_form_field(post, attribute, &block) ⇒ Object
3 4 5 6 7 8 9 |
# File 'app/helpers/proclaim/posts_helper.rb', line 3 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 |