This is a total newbie question, so my apologies!
I am learning Ruby from the book Ruby for rails - the only issue is the
examples seem to have been written in a earlier version of Ruby.
The code in question is
<%= form_tag :controller => "customer",
:action => "login" %>
<p>User name: <%= text_field "customer", "nick" %></p>
<p>Password: <%= password_field "customer", "password" %></p>
<p><input type="Submit", value="Log in"/></p>
<% end_form_tag %>
</p>
Which gives the error
undefined local variable or method `end_form_tag' for
#<ActionView::Base:0x1c39e38>
I appreciate that the end_form_tag has been depreciated, I tried
replacing it with <% end %>
Which then gives
compile error
/Users/pmoran/rails/r4music1/app/views/customer/_login.html.erb:9:
syntax error, unexpected kENSURE, expecting $end
I can't see any examples on the documentation which also specify the
controller, as I say I am a total Ruby newbie so please go easy on me
here!
--
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 [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---