p2p.wrox.com Forums

p2p.wrox.com Forums (http://p2p.wrox.com/index.php)
-   BOOK: Beginning Ruby on Rails (http://p2p.wrox.com/forumdisplay.php?f=289)
-   -   Chapter 5 - start_form_tag is now form_for (http://p2p.wrox.com/showthread.php?t=67374)

davidtspf April 13th, 2008 09:24 PM

Chapter 5 - start_form_tag is now form_for
If you're trying to do the example in Chapter 5 that begins on page 137 in Ruby 2.0.2, you'll need to change "start_form_tag" to form_tag."

You can see the documentation for form_tag here:


You can see a handy list of methods that don't work after the 2.0 upgrade here:


It would be really nice if the author of this book would post a list of things that won't work in 2.0 without changes to the book's code.

davidtspf April 13th, 2008 09:24 PM

P.S. Likewise, end_form_tag is now just simply "form_tag"

lovefool December 12th, 2008 02:09 AM

input.rhtml for RoR 2.2.2
P.147 input.html.erb


<title>Using Text Fields</title>

<h1>Working With Text Fields</h1>
This Ruby on Rails application lets you read data from text fields.

<% form_tag('/look/at') do %>
Please enter your name.
<%= text_field ("cruncher", "crunch", {"size" => 30}) %>
<%=submit_tag (value="SUBMIT") %>
<% end %>


All times are GMT -4. The time now is 01:15 PM.

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.