# Script.aculo.us drag and drop problem

**URL:** <https://www.ruby-forum.com/t/script-aculo-us-drag-and-drop-problem/146323>\
**Category:** Rails\
**Created:** [August 20, 2008, 12:36am UTC](https://www.ruby-forum.com/t/script-aculo-us-drag-and-drop-problem/146323 "2008-08-20T00:36:56Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![elioncho](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/e/ed8c4c/32.png) [@elioncho](https://www.ruby-forum.com/u/elioncho)\
**Post date:** [August 20, 2008, 12:36am UTC](https://www.ruby-forum.com/t/script-aculo-us-drag-and-drop-problem/146323/1 "2008-08-20T00:36:56Z")

</div>

Hello,

I am using [Script.aculo.us](http://Script.aculo.us) helpers “drop\_receiving\_element” and I get  
a “calling against a nil object” and a NoMethodError exception. I used  
the same code un Rails 1.2.6 and it works:

the drag code is:

Code : - fold - unfold

1. 
drop here.
2. \<%= drop\_receiving\_element :dropHelperDIV, :hoverclass =\>  
‘hover’ %\>

and it returns this error

NoMethodError in Chapter4#draggables

Showing chapter4/draggables.html.erb where line #21 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 #21):

Code : - fold - unfold

1. 
2. 
drop here.
3. \<%= drop\_receiving\_element :dropContainment, :hoverclass =\>  
“hover”,
4. 

```
:containment => "'one'" %>

```

Can anyone help me solve this error?

Thanks,
