If I had an action called ''delete'' in a controller
that''s called by a
normal post request, would it be possible to call an rjs template from
it?
Something like:
def delete
# delete whatever
render
end
or:
def delete
# delete whatever
render( :action => ''delete.rjs'' )
end
or:
def delete
# delete whatever
render :update do |page|
page.call( ''myFunction'' )
end
end
Of course, none of the above work, as I''ve tried them.
I also tried to do this in response to a submit from a remote_form, but
still had no luck.
Can anyone advise?
Cheers,
Doug.
--
Posted via http://www.ruby-forum.com/.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Talk" group.
To post to this group, send email to
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk
-~----------~----~----~----~------~----~------~--~---
On 15 Sep 2006, at 15:57, Doug Livesey wrote:> Of course, none of the above work, as I''ve tried them. > I also tried to do this in response to a submit from a remote_form, > but > still had no luck. > Can anyone advise?Calling it from a normal post wouldn''t be logical, it''s not what RJS was designed for. If you''re looking for javascript events on a page load, UJS4Rails (which is great for just about everything btw) could help you out: you can attach javascript to events and even write them just like you would an RJS action. http://www.ujs4rails.com/ Best regards Peter De Berdt --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk -~----------~----~----~----~------~----~------~--~---