Forum: Ruby on Rails Re: Best RJS process for what I'm trying to do...

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
4c4c46ad9a5e4df8ba4ea8353e19c2fd?d=identicon&s=25 Curtis Edmond (Guest)
on 2006-04-10 05:20
(Received via mailing list)
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:


<li><b><%= new.name %></b> <font size="0"><%= link_to "delete", {
:controller => 'meal_names', :action => 'destroy', :id => new.id},
:confirm => "are you sure you want to delete #{new.name}?"
%></font></li>




and I changed my controller code to


 page.insert_html :bottom, :partial => 'new_name', :locals => { :new =>
@name}


what am i missing here?
5d15c6821f3c3054c04b85471824ba7c?d=identicon&s=25 Kevin Olbrich (Guest)
on 2006-04-10 05:53
(Received via mailing list)
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 Edmond wrote:
>:controller => 'meal_names', :action => 'destroy', :id => new.id},
>=> @name}
>
>
>what am i missing here?
>_______________________________________________
>Rails mailing list
>Rails@lists.rubyonrails.org
>http://lists.rubyonrails.org/mailman/listinfo/rails


_Kevin
4c4c46ad9a5e4df8ba4ea8353e19c2fd?d=identicon&s=25 Curtis (Guest)
on 2006-04-10 06:50
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 Olbrich 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 Edmond wrote:
>>:controller => 'meal_names', :action => 'destroy', :id => new.id},
>>=> @name}
>>
>>
>>what am i missing here?
>>_______________________________________________
>>Rails mailing list
>>Rails@lists.rubyonrails.org
>>http://lists.rubyonrails.org/mailman/listinfo/rails
>
>
> _Kevin
This topic is locked and can not be replied to.