Hi, I''m trying to upgrade a rails app to 2.3.11 (from 2.3.2) and I''m seeing some odd behavior. I have a link_to_remote call that works in 2.3.2 but not in anything above that. What I mean by not working is that in my controller I have a new method that I want to handle a javascript new call and pop up a form for creating a new user. To get this I have a page with a link to remote like so: link_to_remote(image_tag(''adduser.gif'', :border => "0"), :url => new_users_path(:id => @reader.journal_id), :method => :get) in my controller I have a new method such as: def new @user = User.new respond_to do |wants| wants.js end end and a new.rjs.js with something like: page.replace_html("add_user_window",:partial => ''new_user_win.html.erb'') page.show("add_user_window") This works fine in 2.3.2. Trying to upgrade to anything beyond 2.3.2 and the clicking of link to remote doesn''t "register" with the controller as being a JS call and I get an error saying it can''t find a new.html.erb template. I''ve changed no other code than to upgrade rails. Has anyone seen anything like this? I''ve been trying to read all the upgrade notes I can get my hands on. I guess I''m looking for ideas, pointers, suggestions, anything... Thanks! Jay -- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Chirag Singhal
2011-Jun-30 03:50 UTC
Re: Trying to upgrade a rails app from 2.3.2 to 2.3.11
Rename your template from new.rjs.js to new.js.rjs and it should work -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To view this discussion on the web visit https://groups.google.com/d/msg/rubyonrails-talk/-/rxdCYx2GXiwJ. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
thanks man! I''m going to try that right now... that makes a bunch of sense. I appreciate you taking the time to respond. On Jun 29, 11:50 pm, Chirag Singhal <chirag.sing...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Rename your template from new.rjs.js to new.js.rjs and it should work-- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.