Sha256: 0e2df647a5c5badc7f241e8f148116b1899dee51600b710605661851f8254b79

Contents?: true

Size: 250 Bytes

Versions: 13

Compression:

Stored size: 250 Bytes

Contents

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

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
proclaim-0.6.6 app/helpers/proclaim/posts_helper.rb
proclaim-0.6.5 app/helpers/proclaim/posts_helper.rb
proclaim-0.6.4 app/helpers/proclaim/posts_helper.rb
proclaim-0.6.3 app/helpers/proclaim/posts_helper.rb
proclaim-0.6.2 app/helpers/proclaim/posts_helper.rb
proclaim-0.6.1 app/helpers/proclaim/posts_helper.rb
proclaim-0.6.0 app/helpers/proclaim/posts_helper.rb
proclaim-0.5.6 app/helpers/proclaim/posts_helper.rb
proclaim-0.5.5 app/helpers/proclaim/posts_helper.rb
proclaim-0.5.3 app/helpers/proclaim/posts_helper.rb
proclaim-0.5.2 app/helpers/proclaim/posts_helper.rb
proclaim-0.5.1 app/helpers/proclaim/posts_helper.rb
proclaim-0.5.0 app/helpers/proclaim/posts_helper.rb