I am a newbie at rails and can’t figure out the following problem. Can
anyone help?
I am running the following:
Ruby version 1.8.6 (powerpc-darwin9.4.0)
RubyGems version 1.2.0
Rails version 2.1.0
Active Record version 2.1.0
Action Pack version 2.1.0
Active Resource version 2.1.0
Action Mailer version 2.1.0
Active Support version 2.1.0
I created three models using the: “script/generate scaffold modelname
name:string address:string city:string” format.
The first two models work using the CRUD forms. On the third model I
get the following error when I access http://localhost:3000/users/new
ArgumentError in Users#new
Showing users/new.html.erb where line #8 raised:
wrong number of arguments (1 for 0)
Extracted source (around line #8):
5:
6:
7: <%= f.label :name %>
8: <%= f.text_field :name %>
9:
10:
11: <%= f.label :time %>
RAILS_ROOT: /Users/ryan/Documents/Projects/store
Application Trace | Framework Trace | Full Trace
/usr/local/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action_view/
helpers/form_helper.rb:623:in send' /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action_view/ helpers/form_helper.rb:623:in
value_before_type_cast’
/usr/local/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action_view/
helpers/form_helper.rb:612:in value_before_type_cast' /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action_view/ helpers/form_helper.rb:535:in
to_input_field_tag’
/usr/local/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action_view/
helpers/form_helper.rb:358:in text_field' /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action_view/ helpers/form_helper.rb:709:in
send’
/usr/local/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action_view/
helpers/form_helper.rb:709:in text_field' app/views/users/new.html.erb:8:in
_run_erb_47app47views47users47new46html46erb’
app/views/users/new.html.erb:3:in
_run_erb_47app47views47users47new46html46erb' app/controllers/users_controller.rb:29:in
new’
Request
Parameters:
None
Show session dump
Response
Headers:
{“cookie”=>[],
“Content-Type”=>“text/html”,
“Cache-Control”=>“no-cache”}