ActionView では、条件に基づいて属性を表示する必要があります。
<%= f.text_field :regmax_remote, {
:class => 'span2',
:style => "display:#{@event.regmax_remote.present? ? "block" : "none"};"
}
%>
これについてもっときれいな方法はありますか?
ActionView では、条件に基づいて属性を表示する必要があります。
<%= f.text_field :regmax_remote, {
:class => 'span2',
:style => "display:#{@event.regmax_remote.present? ? "block" : "none"};"
}
%>
これについてもっときれいな方法はありますか?