0
基於rails3中的下拉選擇來顯示/隱藏文本字段的最佳方式是什麼?如何基於rails3中的下拉選擇來顯示/隱藏文本字段
這裏是代碼
<label>Album </label>
<%= select_tag "album", options_for_select(@album_fields, params[:album])" %>
<!--ONLY DISPLAY the label and text_field if one of the selection IS SELECTED-->
<label>New Album Name: </label>
<%= text_field "new_album_name", params[:new_album_name], :id =>"albumname" %>
感謝