0

this is my 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 the control seems that the country_id is null or empty

what i cant understand is that i use same syntax in another control and work us expected

i try also add hardcoded country_id

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

and not working the control rendering but the country_id is null

24sharon
  • 1,859
  • 7
  • 40
  • 65

1 Answers1

0

OK i got the problem

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

i actually don't know why in one controller its work and on the other it doesn't work

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

its work as expected

thanks

24sharon
  • 1,859
  • 7
  • 40
  • 65