# Newbie Help

**URL:** <https://www.ruby-forum.com/t/newbie-help/94446>\
**Category:** Rails\
**Created:** [May 3, 2006, 7:10pm UTC](https://www.ruby-forum.com/t/newbie-help/94446 "2006-05-03T19:10:36Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![dbrady010](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/919ad9/32.png) [@dbrady010](https://www.ruby-forum.com/u/dbrady010)\
**Post date:** [May 3, 2006, 7:10pm UTC](https://www.ruby-forum.com/t/newbie-help/94446/1 "2006-05-03T19:10:36Z")

</div>

Is it my environment? Is something wrong, cause I thought this should  
just work?

I have a simple table and I created a model and a controller:

ruby script/generate controller Restaurant  
ruby script/generate model Restaurant

I edited the controller to this:

class RestaurantController \< ApplicationController  
scaffold :Restaurant  
end

I run it and:

[http://0.0.0.0:3000/Restaurant](http://0.0.0.0:3000/Restaurant) works fine, gives me a list of  
restaurants.

If I click on edit though I get this:

Showing  
usr/local/lib/ruby/gems/1.8/gems/actionpack-1.12.1/lib/action\_controller/templates/scaffolds/edit.rhtml  
where line #4 raised:

wrong number of arguments (0 for 1)  
Extracted source (around line #4):

1:

# Editing \<%= @scaffold\_singular\_name %\>
  
2:  
3: \<%= error\_messages\_for(@scaffold\_singular\_name) %\>  
4: \<%= form(@scaffold\_singular\_name, :action =\>  
“update#{@scaffold\_suffix}”) %\>  
5:  
6: \<%= link\_to “Show”, :action =\> “show#{@scaffold\_suffix}”, :id =\>  
instance\_variable\_get(“@#{@scaffold\_singular\_name}”) %\> |  
7: \<%= link\_to “Back”, :action =\> “list#{@scaffold\_suffix}” %\>

Likewise if I click on New:

ArgumentError in Restaurant#new

Showing  
usr/local/lib/ruby/gems/1.8/gems/actionpack-1.12.1/lib/action\_controller/templates/scaffolds/new.rhtml  
where line #4 raised:

wrong number of arguments (0 for 1)  
Extracted source (around line #4):

1:

# New \<%= @scaffold\_singular\_name %\>
  
2:  
3: \<%= error\_messages\_for(@scaffold\_singular\_name) %\>  
4: \<%= form(@scaffold\_singular\_name, :action =\>  
“create#{@scaffold\_suffix}”) %\>  
5:  
6: \<%= link\_to “Back”, :action =\> “list#{@scaffold\_suffix}” %\>

Here’s my table definition;

CREATE TABLE `restaurants` (  
`id` INTEGER NOT NULL AUTO\_INCREMENT,  
`name` VARCHAR(100) NOT NULL DEFAULT ‘’,  
`phone` VARCHAR(14) NOT NULL DEFAULT ‘’,  
`fax` VARCHAR(14) NOT NULL DEFAULT ‘’,  
`email` VARCHAR(100) DEFAULT ‘’,  
`web` VARCHAR(100) DEFAULT ‘’,  
`address1` VARCHAR(100) NOT NULL DEFAULT ‘’,  
`address2` VARCHAR(100) DEFAULT ‘’,  
`city` VARCHAR(100) NOT NULL DEFAULT ‘’,  
`state` CHAR(2) NOT NULL DEFAULT ‘’,  
`zip` VARCHAR(10) NOT NULL DEFAULT ‘’,  
`open` BOOLEAN NOT NULL DEFAULT 0,  
PRIMARY KEY(`id`)  
)  
ENGINE = InnoDB  
CHARACTER SET utf8;

This on Mac OSX. I set up Ruby and Rails accoring to this:

> **[Dan Benjamin](https://danbenjamin.com)**
>
> Dan Benjamin's personal website.

---

<div class="post-metadata">

**Author:** ![dbrady010](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/919ad9/32.png) [@dbrady010](https://www.ruby-forum.com/u/dbrady010)\
**Post date:** [September 25, 2007, 11:10pm UTC](https://www.ruby-forum.com/t/newbie-help/94446/2 "2007-09-25T23:10:19Z")

</div>

On Mon, Sep 17, 2007 at 05:51:53AM +0900, Gaspard B. wrote:

> Here are the results. You gain 10% speed by using symbols in such a situation.

In short, then, it looks like I was right: all else being equal, symbols  
are a little faster than strings, but don’t (generally) leave the hash  
table that stores them so too many symbols may undesirably increase  
memory usage.
