Dave Aronson wrote:
> On Wed, Aug 4, 2010 at 03:00, Musdev Musdev <[email protected]>
> wrote:
>
>> I get this Error message in my browser
>> �SyntaxError in ProductsController#index
>>
>> /Users/musdev/work/depot/app/models/product.rb:11: Invalid char `\x1B'
>> in expression
>>
>>
>> The code in my product.rb file
>
> Which of those lines is #11? I don't see immediately any obvious bad
> chars in what you posted, but perhaps that's due in part to the email
> processing. Have you tried deleting and retyping that line?
>
> -Dave
>
> --
> Specialization is for insects. -RAH �| Have Pun, Will Babble! -me
> Programming Blog: http://codosaur.us | Work: http://davearonson.com
> Leadership Blog: �http://dare2xl.com | Play: http://davearonson.net
> * * * * * WATCH THIS SPACE * * * * * | Ruby: http://mars.groupsite.com
I tried deleting and retyping the line without touching anything else
and now I see this error message in my browser
NoMethodError in Products#index
Showing app/views/products/index.html.erb where line #6 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.each
Extracted source (around line #6):
3:
4: <table>
5:
6: <% @products.each do |product| %>
7: <tr class="<%= cycle('list-line-odd', 'list-line-even') %>">
8: <td>
9: <%= image_tag product.image_url, :class => 'list-image' %>
--
Posted via http://www.ruby-forum.com/.
--
You received this message because you are subscribed to the Google Groups "Ruby
on Rails: Talk" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en.