For some reason, any code in my view folder that contains <% form_tag do %> followed by text and variables only produces a blank page with no errors. If I remove the form_tag statements and leave only text, the page is displayed fine. I tried putting <%= @content_for_layout%> in my layout/application.rhtml file based on a recommendation from another post but it did not help. The file is actually my login.rhtml used in acts_as_authenticated but I have tried all kinds of simplified variations and have concluded that the problem stems from that fact that for some reason, the form_tag do command cannot display it''s output. I''m kinda stuck at the moment and any help at all would be greatly appreciated. Thanks! The code from login.rhtml: <% form_tag do -%> <p><label for="login">Login</label><br/> <%= text_field_tag ''login'' %></p> <p><label for="password">Password</label><br/> <%= password_field_tag ''password'' %></p> <!-- Uncomment this if you want this functionality <p><label for="remember_me">Remember me:</label> <%= check_box_tag ''remember_me'' %></p> --> <p><%= submit_tag ''Log in'' %></p> <% end -%> --~--~---------~--~----~------------~-------~--~----~ 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 Chucky, Chucky wrote:> For some reason, any code in my view folder that contains <% form_tag do > %> followed by text and variables only produces a blank page with no > errors.I''ve not worked with the ... ''do'', but if not too much has changed, it might be because you''re not telling Rails to render your form tags. Try ... <%= form_tag ... hth, Bill If I remove the form_tag statements and leave only text, the> page is displayed fine. > > I tried putting <%= @content_for_layout%> in my > layout/application.rhtml file based on a recommendation from another > post but it did not help. > > The file is actually my login.rhtml used in acts_as_authenticated but I > have tried all kinds of simplified variations and have concluded that > the problem stems from that fact that for some reason, the form_tag do > command cannot display it''s output. I''m kinda stuck at the moment and > any help at all would be greatly appreciated. Thanks! > > The code from login.rhtml: > <% form_tag do -%> > <p><label for="login">Login</label><br/> > <%= text_field_tag ''login'' %></p> > > <p><label for="password">Password</label><br/> > <%= password_field_tag ''password'' %></p> > > <!-- Uncomment this if you want this functionality > <p><label for="remember_me">Remember me:</label> > <%= check_box_tag ''remember_me'' %></p> > --> > > <p><%= submit_tag ''Log in'' %></p> > <% end -%> > > > > >--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Chucky wrote:> > For some reason, any code in my view folder that contains <% form_tag > do %> followed by text and variables only produces a blank page with no > errors. If I remove the form_tag statements and leave only text, the > page is displayed fine.What version of Rails are you using? Using a block with form_tag was only introduced on October 24th: http://www.loudthinking.com/arc/2006_10.html so unless you are on Edge or using the release candidate for 1.2, it won''t work for you. regards Justin --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---