From: Martin DeMello Date: 2009-07-13T16:22:56+09:00 Subject: Re: I just love RoR On Mon, Jul 13, 2009 at 12:28 PM, Luis Teko wrote: > NoMethodError in Movie#new > > Showing movie/new.html.erb where line #8 raised: > You have a nil object when you didn't expect it! > You might have expected an instance of Array. > The error occurred while evaluating nil.map > > Extracted source (around line #8): > > 5:

: > 6: <%= text_field 'movie', 'price' %>

> 7:

: > 8: <%= collection_select(:movie,:genre_id,@genres,:id,:title) %>

> 9:


> 10: <%= text_area 'movie', 'description' %>

> 11: <%= submit_tag "Create" %> Paste in the code for collection_select (and try asking on the rails list - if this is a rails-specific problem, you'll get better answers there). martin