p2p.wrox.com Forums

p2p.wrox.com Forums (http://p2p.wrox.com/)
-   BOOK: Beginning Ruby on Rails (http://p2p.wrox.com/book-beginning-ruby-rails-289/)
-   -   Chapter 5 - start_form_tag is now form_for (http://p2p.wrox.com/book-beginning-ruby-rails/67374-chapter-5-start_form_tag-now-form_for.html)

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:

http://api.rubyonrails.org/

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

http://www.slashdotdash.net/articles...-upgrade-notes

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 01:09 AM

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


Quote:

<html>
<head>
<title>Using Text Fields</title>
</head>

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

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

</body>
</html>



All times are GMT -4. The time now is 11:24 AM.

Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
2013 John Wiley & Sons, Inc.