0
这是我简单的代码轨渲染部分不工作
<%= render :partial => '/manage/regions/get_by_country', :locals => {:country_id => @last_search.country_id} %>
的@ last_search.country_id已值(选中)
,但同时呈现的控制似乎COUNTRY_ID为空或空
我不能理解的是,我在另一个控件中使用相同的语法,并在我们预期的工作
我也尝试添加硬编码country_id
<%@id = 118%>
<%= render :partial => 'manage/regions/get_by_country', :locals => {:country_id => @id} %>
<%end%>
,而不是工作 控制渲染,但COUNTRY_ID是空
您的代码应该工作。但试试这个:'render'manage/regions/get_by_country',::country_id => @ last_search.country_id' – user2503775
发布** manage/regions/get_by_country **页面代码 –