<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>In a world where ninja&#039;s rule, i am Solar Sneeze Phantom &#187; Programming</title>
	<atom:link href="http://www.marcosantos.com/archives/category/programming/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.marcosantos.com</link>
	<description>In a world where ninja&#039;s rule, i am Solar Sneeze Phantom</description>
	<lastBuildDate>Sun, 21 Feb 2010 09:59:29 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>Ruby on Rails: Scaffold before and after 2.0</title>
		<link>http://www.marcosantos.com/archives/2009/03/22/ruby-on-rails-scaffold-before-and-after-20/</link>
		<comments>http://www.marcosantos.com/archives/2009/03/22/ruby-on-rails-scaffold-before-and-after-20/#comments</comments>
		<pubDate>Sun, 22 Mar 2009 18:30:43 +0000</pubDate>
		<dc:creator>Marco</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[Ruby on Rails]]></category>

		<guid isPermaLink="false">http://www.marcosantos.com/?p=20</guid>
		<description><![CDATA[Here we are, i have spent quite some time figuring this out, hopefully google is our friend and patient as well, this example comes from doing the [...]]]></description>
			<content:encoded><![CDATA[<p><img src='http://www.marcosantos.com/wp-content/plugins/simple-post-thumbnails/timthumb.php?src=/wp-content/thumbnails/20.jpeg&amp;w=200&amp;h=150&amp;zc=1&amp;ft=jpg' alt='post thumbnail' /></p>
<p>Here we are, i have spent quite some time figuring this out, hopefully google is our friend and patient as well, this example comes from doing the excelent Beginning Ruby on Rails book from Wrox, chapter 6 page 167.</p>
<p>Please read the comments on the code:</p>
<pre name="code" class="ruby"># Ruby on Rails - Learnt by example, Scaffold issue old vs new
# Book: Beginning Ruby on Rails Chapter 6 (page 167)
# Marco's notes: 2009.03.23

# In step 2 - Create a model named Item and a controller named Manage ...
# Original code, as run by the Ruby 1.8.4 and Rails 1.2.1 (circa 2006)

 ruby script/generate scaffold Item Manage

# Results in this:   wrong number of arguments (1 for 2)
# Topic available here:
# http://groups.google.com/group/bangalorerug/browse_thread/thread/c08b0dccd17f06d1

# This ofcourse won't work in Ruby 1.8.6 (universal-darwin9.0)
# and Rails version	2.3.2

# So we try this:

# ruby script/generate scaffold model field:fieldType ...
 ruby script/generate scaffold Item name:string description:text price:float

# This solves the issue in page 167, but remember that now your controller will be
# items, not manage, so in the example would be http://localhost:3000/items
</pre>
<p>See, there you go, remember that after doing this, in your chapter 6, you won&#8217;t access your scaffold result by going to http://localhost:3000/manage but http://localhost:3000/items.</p>
<p>Beginning Ruby on Rails &#8211; Chapter 6 <a href="http://p2p.wrox.com/book-beginning-ruby-rails/67442-chapter-6-scaffold-error-wrong-number-args.html">Wrong number of arguments</a>.</p>
<p>Also a nice tutorial, although a bit long is: <a href="http://fairleads.blogspot.com/2007/12/rails-20-and-scaffolding-step-by-step.html">Rails 2.0 step by step</a>.</p>
<p>Hope this has helped.</p>
<!-- PHP 5.x -->]]></content:encoded>
			<wfw:commentRss>http://www.marcosantos.com/archives/2009/03/22/ruby-on-rails-scaffold-before-and-after-20/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
