Matt
2006-Jun-01 17:00 UTC
[Rails] link_to_remote renders Ajax.Updater, sometimes Ajax.Request
I''m new to Rails, but am really enjoying working with it.
But i just hit a brick wall...
I have two link_to_remote tags in two seperate _whatever.rhtml files.
The targets of the updates are in edit.rhtml which does a render
:partial to include the links. here''s some code:
<%= link_to_remote ''Destroy'',
:update => "libtable",
:url => {:action => ''destroylib'', :id
=> lib.id, :rid =>
@release},
:loading =>
"Element.show(''lib#{lib.id}'')",
:complete =>
"Element.hide(''lib#{lib.id}'')",
:confirm => "Are you sure you want to delete this entry:
#{lib.libfile}"%>
<%= link_to_remote ''Destroy'',
:upate => "packagetable_div",
:url => {:action => ''destroypackage'', :id =>
package.id, :rid
=> @release},
:loading =>
"Element.show(''package#{package.id}'')",
:complete =>
"Element.hide(''package#{package.id}'')",
:confirm => "Are you sure you want to delete this entry:
#{package.path}"%>
The first tag properly generates an Ajax.Updater element in the html,
the second generates an Ajax.Request and has no mention of
"packagetable_div". The end result is that the packagetable_div never
gets updated...
Any ideas as to why this would happen?
Thanks so much!
Matt
--
Posted via http://www.ruby-forum.com/.
Matt
2006-Jun-01 17:13 UTC
[Rails] Re: link_to_remote renders Ajax.Updater, sometimes Ajax.Requ
Matt wrote:> <%= link_to_remote ''Destroy'', > :upate => "packagetable_div", > :url => {:action => ''destroypackage'', :id => package.id, :rid > => @release}, > :loading => "Element.show(''package#{package.id}'')", > :complete => "Element.hide(''package#{package.id}'')", > :confirm => "Are you sure you want to delete this entry: > #{package.path}"%>wow, :upate != :update I searched over the code so many times looking for typos, and i find this minutes after posing to the list! It always seems to go this way for me :) Thanks anyway, and keep up with the good work (Rails)! Matt -- Posted via http://www.ruby-forum.com/.
Possibly Parallel Threads
- dimnames in array
- Bug : Autocorrelation in sample drawn from stats::rnorm (hmh)
- Bug : Autocorrelation in sample drawn from stats::rnorm (hmh)
- authenticating using winbindd against NT4 domain fails
- FW: authenticating using winbindd against NT4 domain fail s (URGENT)