Forum: Ruby on Rails :action through .rjs template?

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
D12eb3135791d642b4bc46b9d04dc034?d=identicon&s=25 Rails junkie (Guest)
on 2007-02-11 00:13
(Received via mailing list)
Hello All,

 I have a nooby question again.
Here is what I am trying to do: I have a DIV object which shows my
'list of items'. If users click on link 'Add Item', i fade out another
DIV which is data entry screen. Now user enter data hit 'save' . Once
Saved. I need to show 'New Saved Items' instead of 'List of Items' .
What would the best way to do this? I am was trying to use RJS
template since it involves fading 'list of items' and retrieving/
showing 'New Saved  Items ' .
I have an action 'NewSavedItem' which need to be invoked to retrieve
the list with one paramter :userId.

So far in my 'addItem' Action, after saving the item, I have code
redirect_to :action =>"refresh" ,:uid=>@userId
where 'refresh' is my rjs template.
In rjs temmplate i hide the 'list of itms' which works fine but i am
not sure how to call the action 'newSavedItem' to retrieve the new
Any ideas please?
thank you
This topic is locked and can not be replied to.