Explore by Country

Action Controller: Exception caught

NoMethodError in Main#start_country

Showing app/views/main/start_country.rhtml where line #8 raised:

You have a nil object when you didn't expect it!
The error occurred while evaluating nil.country

Extracted source (around line #8):

5: 	<option value="">Select a Country</option>
6: 	<% for get_by_country in @get_by_country %>
7: 		<% @country_name = ArbitCurrency.find_by_sql(["select * from arbit_currencies where symbol_replacement = ? and country = ? order by country asc", get_by_country.currency, get_by_country.currency_country]) %>
8: 		<option value="<%=get_by_country.currency%>"><%=@country_name[0].country%></option>
9: 		<img src="/images/flag/<%=@country_name[0].flag_image%>">
10: 		<%=get_by_country.currency%>
11: 		<%=get_by_country.currency_country%>

RAILS_ROOT: /home/my7hops/my7hops

Application Trace | Framework Trace | Full Trace
app/views/main/start_country.rhtml:8
app/views/main/start_country.rhtml:6:in `each'
app/views/main/start_country.rhtml:6
app/views/main/explore.rhtml:11

Request

Parameters:

{"id"=>nil}

Show session dump

Response

Headers:

{"Status"=>"200 OK",
 "X-Runtime"=>"2ms",
 "Content-Type"=>"",
 "cookie"=>[],
 "Cache-Control"=>"no-cache"}