rendering - rails render partial not working -


this simple code

<%= render :partial => '/manage/regions/get_by_country', :locals => {:country_id => @last_search.country_id} %> 

the @last_search.country_id has value (checked)

but while rendering control seems country_id null or empty

what cant understand use same syntax in control , work expected

i try add hardcoded country_id

<%@id = 118%>            <%= render :partial => 'manage/regions/get_by_country', :locals => {:country_id => @id} %>           <%end%> 

and not working control rendering country_id null

ok got problem

the variable on partial named @country_id , passed country_id (with no '@')

i don't know why in 1 controller work , on other doesn't work

but when change variable on partial country_id (with no '@')

its work expected

thanks


Comments

Popular posts from this blog

java.util.scanner - How to read and add only numbers to array from a text file -

rewrite - Trouble with Wordpress multiple custom querystrings -