mã này: = form_fo: store_products do | f | = f.check_box: track_inventoryTại sao trình trợ giúp biểu mẫu check_box tạo hai hộp kiểm, một hộp kiểm bị ẩn?
tạo html này:
<input name="product_group[products_attributes][0][store_products_attributes}[1342647745501][track_inventory]" type="hidden" value="0">
<input id="product_group_products_attributes_0_store_products_attributes_1342647745501_track_inventory" name="product_group[products_attributes][0][store_products_attributes][1342647745501][track_inventory]" type="checkbox" value="1">
lý do cho các phần tử ẩn đầu tiên là gì?
Tôi nghĩ bạn có lỗi đánh máy. Hãy thử 'form_for' thay vì' form_for'. – Dougui