I have a really simple RJS question. Lets say I have a controller with the action create. I want to handle the action in a rjs template so I have something like... def create respond_to do |format| ... format.js end end Now i know an ajax call will result in the program looking for a create.rjs template to call. The problem is what if I have another controller with a create action that I also want to use a template with? Then I would have two different RJS templates called create. Is there a way to change the default name of the template and instruct the action to call it. Something like: format.js => ''my.rjs'' Thanks, steve -- 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?hl=en -~----------~----~----~----~------~----~------~--~---
Thanks Jeff I will have a look! Jeff Emminger wrote:> Yes, off the top of my head it''s: > > format.js { render :template => ''some_dir_in_views/my.rjs'' } > > Read the docs on render(): > http://api.rubyonrails.com/classes/ActionController/Base.html#M000452 > > > On Mar 15, 12:13 pm, Steve Glaz <rails-mailing-l...-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org>-- 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?hl=en -~----------~----~----~----~------~----~------~--~---