I''m using Rails 1.2 RC2 and I''ve got a view that uses form_tag and the form is not being rendered. It''s just not there. My view is this: <div class="box"> <fieldset> <legend>Log in</legend> <% form_tag do %> <div class="row"> <div class="formfield"> <label for="sso_id">SSO ID:</label> <%= text_field_tag :sso_id, params[:sso_id] %> </div> </div> <div class="row"> <div class="formfield"> <label for="password">Password:</label> <%= password_field_tag :password, params[:password] %> </div> </div> <%= submit_tag "Login" %> <% end %> </fieldset> </div> My browser output is this: <div class="box"> <fieldset> <legend>Log in</legend> </fieldset> </div> As you can see, it''s just not there. Do I have an error in my view or is there a problem with form_tag in the latest release candidate? -- Sterling Anderson sterling [at] sterlinganderson.net http://sterlinganderson.net/ --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Sterling Anderson wrote:> I''m using Rails 1.2 RC2 and I''ve got a view that uses form_tag and the > form is not being rendered. It''s just not there. My view is this: > > <div class="box"> > <fieldset> > <legend>Log in</legend> > <% form_tag do %><%= form_tag do %> -- 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 -~----------~----~----~----~------~----~------~--~---
On 1/17/07, Andrew Skegg <rails-mailing-list-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote:> > Sterling Anderson wrote: > > I''m using Rails 1.2 RC2 and I''ve got a view that uses form_tag and the > > form is not being rendered. It''s just not there. My view is this: > > > > <div class="box"> > > <fieldset> > > <legend>Log in</legend> > > <% form_tag do %> > > <%= form_tag do %>It should be using the block''s binding to output, so that isn''t necessary. I don''t even think the erb will parse correctly. Are you sure you''re using the right gem? This sounds like you''re still on 1.1.6. -- Rick Olson http://weblog.techno-weenie.net http://mephistoblog.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 -~----------~----~----~----~------~----~------~--~---
On 1/17/07, Andrew Skegg <rails-mailing-list-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote:> > Sterling Anderson wrote: > > I''m using Rails 1.2 RC2 and I''ve got a view that uses form_tag and the > > form is not being rendered. It''s just not there. My view is this: > > > > <div class="box"> > > <fieldset> > > <legend>Log in</legend> > > <% form_tag do %> > > <%= form_tag do %>That is incorrect[1][2]. An exception will be thrown If I do the following: <%= form_tag %> form fields.... </form> the opening form tag is not rendered. So it appears form_tag is not doing anything. [1]http://www.loudthinking.com/arc/000601.html [2]http://weblog.rubyonrails.org/2006/11/26/1-2-new-in-actionpack -- Sterling Anderson sterling [at] sterlinganderson.net http://sterlinganderson.net/ --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Sterling Anderson wrote:> On 1/17/07, Andrew Skegg <rails-mailing-list-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote: >> <%= form_tag do %> > That is incorrect[1][2]. An exception will be thrown > > If I do the following: > > <%= form_tag %> > form fields.... > </form> > > the opening form tag is not rendered. So it appears form_tag is not > doing anything. > > [1]http://www.loudthinking.com/arc/000601.html > [2]http://weblog.rubyonrails.org/2006/11/26/1-2-new-in-actionpack > > -- > Sterling Anderson > sterling [at] sterlinganderson.net > http://sterlinganderson.net/Opps - your right, I''m wrong. I am even looking at some of my own code that does not contain "<%=" ! But Rick''s comment rang a bell - I was looking at this exact issue last night with a friend. He is using Locomotive, which is based on an older version (I am using 1.2RC2 ATM). Changing the line to "<%= start_form_tag ..." fixed it for him. -- 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 -~----------~----~----~----~------~----~------~--~---
On 1/17/07, Andrew Skegg <rails-mailing-list-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote:> Sterling Anderson wrote: > > I''m using Rails 1.2 RC2 and I''ve got a view that uses form_tag > and the > > form is not being rendered. It''s just not there. My view is this: > > > > <div class="box"> > > <fieldset> > > <legend>Log in</legend> > > <% form_tag do %> > > <%= form_tag do %>I ran into problems like this when migrating to 1.2rc1 -- if I recall correctly the problem was that my environment configuration still claimed to be 1.1.6. Have you updated rails within the app? -faisal --~--~---------~--~----~------------~-------~--~----~ 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 1/18/07, Faisal N Jawdat <faisal-yPPMdBsEuU/QT0dZR+AlfA@public.gmane.org> wrote:> I ran into problems like this when migrating to 1.2rc1 -- if I recall > correctly the problem was that my environment configuration still > claimed to be 1.1.6. Have you updated rails within the app?Crikey. I totally forget to check the RAILS_GEM_VERSION environment variable. I commented out the line RAILS_GEM_VERSION = ''1.1.6'' in my environment.rb and lo and behold everything works fine. -- Sterling Anderson sterling [at] sterlinganderson.net http://sterlinganderson.net/ 608.239.8387 --~--~---------~--~----~------------~-------~--~----~ 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, you can also do the following: RAILS_GEM_VERSION = ''1.1.6.xxxx'' where xxxx is the revision number. e.g. RAILS_GEM_VERSION = ''1.1.6.5959'' I wouldn''t recommend commenting something out that my be referenced by other parts of the rails system. After updating this file, then you should perform the following action: rake rails:update Good luck, -Conrad On 1/18/07, Sterling Anderson <sterling-m5t3XAY/qu5DjbiTPaivd+TW4wlIGRCZ@public.gmane.org> wrote:> > On 1/18/07, Faisal N Jawdat <faisal-yPPMdBsEuU/QT0dZR+AlfA@public.gmane.org> wrote: > > > I ran into problems like this when migrating to 1.2rc1 -- if I recall > > correctly the problem was that my environment configuration still > > claimed to be 1.1.6. Have you updated rails within the app? > > Crikey. I totally forget to check the RAILS_GEM_VERSION environment > variable. I commented out the line > > RAILS_GEM_VERSION = ''1.1.6'' > > in my environment.rb and lo and behold everything works fine. > > -- > Sterling Anderson > sterling [at] sterlinganderson.net > http://sterlinganderson.net/ > 608.239.8387 > > > >--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---