RailsCasts Pro episodes are now free!

Learn more or hide this

joserafael1990's Profile

GitHub User: joserafael1990

Comments by


In this part of the code

var states = new Array();
<% for state in @states %>
states.push(new Array(<%= state.country_id %>, '<%=h state.name %>', <%= state.id %>));
<% end %>

Exactly in the for, I am having this error: undefined method `each' for nil:NilClass