# Can't get drop\_receiving\_element to work

**URL:** <https://www.ruby-forum.com/t/cant-get-drop-receiving-element-to-work/136285>\
**Category:** Rails\
**Created:** [April 30, 2008, 12:49pm UTC](https://www.ruby-forum.com/t/cant-get-drop-receiving-element-to-work/136285 "2008-04-30T12:49:59Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![casper\_the\_ghost](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/58956e/32.png) [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Post date:** [April 30, 2008, 12:49pm UTC](https://www.ruby-forum.com/t/cant-get-drop-receiving-element-to-work/136285/1 "2008-04-30T12:49:59Z")

</div>

Any idea what’s wrong with this snippet? Looks pretty simple to me.  
Yet no matter what I try, the drop\_receiving\_element helper causes an  
error.

drop here
\<%= drop\_receiving\_element('dropFoo', :hoverclass =\> 'hover') %\>

I also tried \<% drop\_receiving\_element :dropFoo as this seems the  
preferred syntax in Raymond’s AoR. Same problem, though.

Thanks,  
-S.

The error message:  
NoMethodError in Test#draggables2

Showing test/draggables2.html.erb where line #2 raised:

You have a nil object when you didn’t expect it!  
You might have expected an instance of ActiveRecord::Base.  
The error occurred while evaluating nil.[]

Extracted source (around line #2):

1:

drop green here
  
2: \<%= drop\_receiving\_element(‘dropFoo’, :hoverclass =\> ‘hover’) %\>

[…]
