andrewjones86-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org
2007-Nov-06 23:03 UTC
Replace rhtml view with rjs
Hi, I am following the examples in the Agile Web Development with Rails book and am supposed to be replacing an rhtml view with an rjs. So I deleted the rhtml file and replaced it with an rjs file with the same name. However, I now get an error saying ''No such file found ...rhtml'', even though it should be picking up the rjs instead. Can anyone let me know why this is not working correctly? Am I getting something wrong here? I am very new at this... Thanks for your help, Andrew --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
My understanding is that it has to match your action name, but reside in your views folder, just like the rhtml file. So - say URL is /user/edit that maps to UserController, action edit, then you want to provide your RJS in app/views/user/edit.rjs Works for me :) On Nov 6, 3:03 pm, "andrewjone...-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org" <andrewjone...-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org> wrote:> Hi, > > I am following the examples in the Agile Web Development with Rails > book and am supposed to be replacing an rhtml view with an rjs. So I > deleted the rhtml file and replaced it with an rjs file with the same > name. However, I now get an error saying ''No such file > found ...rhtml'', even though it should be picking up the rjs instead. > Can anyone let me know why this is not working correctly? Am I getting > something wrong here? I am very new at this... > > Thanks for your help, > Andrew--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
On a side note, how do you handle the need for app/views/controller/action.rhtml AND app/views/controller/action.rjs ? My app needs to display an action using the rhtml for the initial display and using the rjs for updates (it''s a paginated list). I am just getting my head around rjs and may be doing it wrong, however ;) -- 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 -~----------~----~----~----~------~----~------~--~---