开发者

Customized error handling

How can I achieve that the code below only will be executed if there is an HTML input-Tag? So that it won't be executed by the HTML label-Tag.

<div class=\"field_wit开发者_运维问答h_errors\">#{html_tag}</div>".html_safe

Thanks in advance!

Regards Silvan


I'm not 100% sure what you're asking, but if you're asking what I think you are you could do something like:

<div class=\"field_with_errors\">#{html_tag}</div>".html_safe unless html_tag.nil?

If this isn't what you're looking for, could you please explain more about what you want to achieve?

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜