Re: file_column issue

straightflush-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
Fri, 30 Mar 2007 12:32:05 -0000

is there a debug mechanism for url_for_image_column ?  I cant track down the
nil here ...


On 3/28/07, straightflush-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
<straightflush-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
wrote:
>
> can anybody here try and help diagnose the file_column error below? I have
> an object @user that has the image properly set up.  This code works on
> other pages just fine but for some reason I am getting the following error:
>
> 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.split
>
> 16: 									  <% if @user.image
>  %>
> 17: 									   <%= image_tag url_for_image_column @user,
"image" %>
> 18: 									  <% else %>
> 19: 									   <img src="/images/qmark.jpg"
width="108" height="108" border="0"
alt="" class="profile">
>
> 20: 									  <% end %>
>
>
>
/opt/local/lib/ruby/gems/1.8/gems/actionpack-1.13.2/lib/action_view/helpers/asset_tag_helper.rb:156:in
`image_path''
> /opt/local/lib/ruby/gems/1.8/gems/actionpack-
> 1.13.2/lib/action_view/helpers/asset_tag_helper.rb:188:in
`image_tag''
> #{RAILS_ROOT}/app/views/content/showprofile.rhtml:17:in
`_run_rhtml_47app47views47content47showprofile46rhtml''
>
> Any ideas ?
>
> Thanks
>
> Adam
>
>
>