# Re: Best RJS process for what I'm trying to do

**URL:** <https://www.ruby-forum.com/t/re-best-rjs-process-for-what-im-trying-to-do/93784>\
**Category:** Rails\
**Created:** [April 10, 2006, 5:20am UTC](https://www.ruby-forum.com/t/re-best-rjs-process-for-what-im-trying-to-do/93784 "2006-04-10T05:20:28Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Curtis\_E](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/b2d939/32.png) [@Curtis\_E](https://www.ruby-forum.com/u/Curtis_E)\
**Post date:** [April 10, 2006, 5:20am UTC](https://www.ruby-forum.com/t/re-best-rjs-process-for-what-im-trying-to-do/93784/1 "2006-04-10T05:20:28Z")

</div>

so I tried that and now I get an RJS error in a popup window it states

[object error]

Here’s what I changed and tried…I created a new partial called  
\_new\_name that is as follows:

- **\<%= new.name %\>** \<%= link\_to "delete", { :controller =\> 'meal\_names', :action =\> 'destroy', :id =\> new.id}, :confirm =\> "are you sure you want to delete #{new.name}?" %\>

and I changed my controller code to

page.insert\_html :bottom, :partial =\> ‘new\_name’, :locals =\> { :new =\>  
@name}

what am i missing here?

---

<div class="post-metadata">

**Author:** ![Curtis\_E](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/b2d939/32.png) [@Curtis\_E](https://www.ruby-forum.com/u/Curtis_E)\
**Post date:** [April 10, 2006, 5:53am UTC](https://www.ruby-forum.com/t/re-best-rjs-process-for-what-im-trying-to-do/93784/2 "2006-04-10T05:53:38Z")

</div>

Try telling it _where_ to insert the html

page.insert\_html :bottom, ‘meal\_names’, :partial =\> ‘new\_name’, :locals  
=\> { :new =\> @name}

Not sure what that error message is all about.

On Sunday, April 09, 2006, at 9:19 PM, Curtis E. wrote:

> :controller =\> ‘meal\_names’, :action =\> ‘destroy’, :id =\> new.id},  
> =\> @name}
> 
> what am i missing here?
> 
> * * *
> 
> Rails mailing list  
> removed\_email\_address@domain.invalid  
> [http://lists.rubyonrails.org/mailman/listinfo/rails](http://lists.rubyonrails.org/mailman/listinfo/rails)

\_Kevin

---

<div class="post-metadata">

**Author:** ![Curtis\_E](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/b2d939/32.png) [@Curtis\_E](https://www.ruby-forum.com/u/Curtis_E)\
**Post date:** [April 10, 2006, 6:50am UTC](https://www.ruby-forum.com/t/re-best-rjs-process-for-what-im-trying-to-do/93784/3 "2006-04-10T06:50:53Z")

</div>

That did the trick! I guess that would make sense, telling it where to  
stick the update and all. Cool beans. Thanks again for taking the time  
out and setting my head straight, I think i had just been looking at it  
too long.

Kevin O. wrote:

> Try telling it _where_ to insert the html
> 
> page.insert\_html :bottom, ‘meal\_names’, :partial =\> ‘new\_name’, :locals  
> =\> { :new =\> @name}
> 
> Not sure what that error message is all about.
> 
> On Sunday, April 09, 2006, at 9:19 PM, Curtis E. wrote:
> 
> > :controller =\> ‘meal\_names’, :action =\> ‘destroy’, :id =\> new.id},  
> > =\> @name}
> > 
> > what am i missing here?
> > 
> > * * *
> > 
> > Rails mailing list  
> > removed\_email\_address@domain.invalid  
> > [http://lists.rubyonrails.org/mailman/listinfo/rails](http://lists.rubyonrails.org/mailman/listinfo/rails)
> 
> \_Kevin
