Hi, Is there a bug with the use of partials and how the input from forms is handled? My app is working fine if I use a plain view and form_tag, but as soon as I switch to partials and form_remote_tag I''m not able to keep the input as ISO-8859-1 I''d like to use form_remote_tag, or at least find a way to keep the spinner and Ajax effects. The code is available at http://pastie.caboo.se/73275 I''m running Ruby 1.8.5 and Rails 1.2.3. Any hints to what I might do wrong, or what topics I should dig into, is highly appreciated! Cheers, Martin Stabenfeldt --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Well, for starters, you''ve got <head> and <body> tags in your partial. That''s got to be confusing your browser. Rip the first 4 lines out of your partial and try again. My next suggestion is to try to move your _publish partial into main.rhtml. I suspect the problem you''re having has nothing to do with using partials, and more to do with how rails, or your browser, processes AJAX requests. (Assuming that the two <heads> wasn''t the problem, which it might be.) On Jun 25, 8:01 am, "Martin Stabenfeldt" <mar...-sCXqIeMX0Gf7tLni4+Tb9Q@public.gmane.org> wrote:> Hi, > > Is there a bug with the use of partials and how the input from forms is > handled? > > My app is working fine if I use a plain view and form_tag, but as > soon as I switch to partials and form_remote_tag I''m not able to > keep the input as ISO-8859-1 > > I''d like to use form_remote_tag, or at least find a way to keep the > spinner and Ajax effects. > > The code is available athttp://pastie.caboo.se/73275 > I''m running Ruby 1.8.5 and Rails 1.2.3. > > Any hints to what I might do wrong, or what topics I should dig into, is > highly appreciated! > > Cheers, > Martin Stabenfeldt--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Hi,> On Jun 25, 8:01 am, "Martin Stabenfeldt" <mar...-sCXqIeMX0Gf7tLni4+Tb9Q@public.gmane.org> > > Is there a bug with the use of partials and how the input from forms is > > handled? > > > > My app is working fine if I use a plain view and form_tag, but as > > soon as I switch to partials and form_remote_tag I''m not able to > > keep the input as ISO-8859-1On 25/06/07, Jon <jgarvin.lists-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Well, for starters, you''ve got <head> and <body> tags in your > partial. That''s got to be confusing your browser. Rip the first 4 > lines out of your partial and try again. > My next suggestion is to try to move your _publish partial into > main.rhtml. I suspect the problem you''re having has nothing to do > with using partials, and more to do with how rails, or your browser, > processes AJAX requests. (Assuming that the two <heads> wasn''t the > problem, which it might be.)Thanks for the tips Jon, I tried that but wasn´t able to keep the charset even after I made the changes you suggested. The only part that really needed ISO-8859-1 was CGI.escape, so I converted the string with iconv just before I passed it along to CGI.escape. iso_str = Iconv.new(''iso-8859-1'', ''utf-8'').iconv(message) encoded_message = CGI.escape(iso_str) Cheers, Martin --~--~---------~--~----~------------~-------~--~----~ 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@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---