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:
<% form_tag do %>
<label for="sso_id">SSO ID:</label>
<%= text_field_tag :sso_id, params[:sso_id] %>
<%= password_field_tag :password, params[:password] %>
<%= submit_tag "Login" %>
<% end %>
My browser output is this:
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?
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.
That is incorrect. An exception will be thrown
If I do the following:
<%= form_tag %>
the opening form tag is not rendered. So it appears form_tag is not
Ruby on Rails — Rails 1.2 RC1: New in Action Pack
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.
Hi, you can also do the following:
RAILS_GEM_VERSION = '1.1.6.xxxx' where xxxx is the revision number.
RAILS_GEM_VERSION = '220.127.116.1159'
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: