Get a value of object field inside fields_for loop

后端 未结 2 557
野的像风
野的像风 2021-02-01 02:37

In the following scenario, I need to check the value of the object property in the fields_for loop.

<%= f.semantic_fields_for :review_details do          


        
2条回答
  •  甜味超标
    2021-02-01 03:04

    I got it, I can use

    rd.object.review_criteria_id
    

    object is the default wrapper object for the fields_for loop.

提交回复
热议问题