# Can someone please help a very eager Rails newbie?

**URL:** <https://www.ruby-forum.com/t/can-someone-please-help-a-very-eager-rails-newbie/143819>\
**Category:** Rails\
**Created:** [July 23, 2008, 1:23am UTC](https://www.ruby-forum.com/t/can-someone-please-help-a-very-eager-rails-newbie/143819 "2008-07-23T01:23:30Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![A\_Love\_of\_Surf](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/d9b06d/32.png) [@A\_Love\_of\_Surf](https://www.ruby-forum.com/u/A_Love_of_Surf)\
**Post date:** [July 23, 2008, 1:23am UTC](https://www.ruby-forum.com/t/can-someone-please-help-a-very-eager-rails-newbie/143819/1 "2008-07-23T01:23:30Z")

</div>

ok, so I am trying to learn the ‘c’ in crud from a tutorial right  
now. Using the source below, I am loading the action ‘new’, filling  
out a form to create a new record, and submitting the form to save the  
record. The problem comes when I submit the form. The app generates  
an error saying that the method commit= is not defined. At this  
point, I don’t know enough about rails to extrapolate meaning from  
this weirdness or to know what I should include in this request that’d  
help someone to help me.

# ================================ SOURCE:

CONTROLLER:

class PublicController \< ApplicationController

def album\_list  
@page\_title = ‘railstest/public/album\_list (Original)’  
@albums = Album.find\_by\_sql(‘SELECT \* FROM albums;’)  
end

def alt\_album\_list  
@page\_title = ‘railstest/public/alt\_album\_list’  
release\_date = ‘2003-01-01’  
@albums = Album.find(:all,  
:order =\> ‘title, release\_date ASC’)  
render(:action =\> ‘album\_list’)  
end

def show\_album  
@page\_title = ‘railstest/public/show\_album (Inspect Album)’  
@album = Album.find(:first)

end

def show  
@album = Album.find(params[:id])  
render(:action =\> :show\_album)  
end

def create  
@album = Album.new(params)  
if @album.save

# redirect\_to(:action =\> ‘show’, :id =\> @album.id)

```
  redirect_to(:action => 'alt_album_list')
else
  render(:action => 'new')
end

```

end

def new  
@album = Album.new  
@page\_title = ‘New Model’

end

end

CREATION FORM PAGE:

Rails DB: \<%= @page\_title %\>

\<% form\_tag(:action =\> ‘create’) do -%\>  
Id: \<%= text\_field(:id, @album.id) %\>  
  
Artist: \<%= text\_field(:artist, @album.artist) %\>  
  
Title: \<%= text\_field(:title, @album.title) %\>  
  
Genre: \<%= text\_field(:genre, @album.genre) %\>  
  
Release Date: \<%= datetime\_select(:release\_date,  
@album.release\_date, :start\_year =\> 1960, :end\_year =\> 2008) %\>  
  
\<%= submit\_tag(‘Create’) %\>  
  
\<% end -%\>

\<%= debug(params) %\>

VIEW ON SUCCESS:

Rails DB: \<%= @page\_title %\>

\<% for album in @albums -%\>  
\<%= link\_to(album.artist, :controller =\> ‘public’, :action =\>  
‘show’, :id =\> album.id) %\> - \<%= album.title %\> (\<%= album.id %\>)\<br /

> 

\<% end -%\>

ON FAIL IT SHOULD GO BACK TO CREATION FORM PAGE

# ================================ ERROR:

NoMethodError in PublicController#create

undefined method `commit=’ for #Album:0x6068320

RAILS\_ROOT: C:/www/railstest  
Application Trace | Framework Trace | Full Trace

c:/ruby/lib/ruby/gems/1.8/gems/activerecord-2.1.0/lib/active\_record/  
attribute\_methods.rb:251:in `method_missing' c:/ruby/lib/ruby/gems/1.8/gems/activerecord-2.1.0/lib/active_record/ base.rb:2361:in`send’  
c:/ruby/lib/ruby/gems/1.8/gems/activerecord-2.1.0/lib/active\_record/  
base.rb:2361:in `attributes=' c:/ruby/lib/ruby/gems/1.8/gems/activerecord-2.1.0/lib/active_record/ base.rb:2360:in`each’  
c:/ruby/lib/ruby/gems/1.8/gems/activerecord-2.1.0/lib/active\_record/  
base.rb:2360:in `attributes=' c:/ruby/lib/ruby/gems/1.8/gems/activerecord-2.1.0/lib/active_record/ base.rb:2130:in`initialize’  
app/controllers/public\_controller.rb:28:in `new' app/controllers/public_controller.rb:28:in`create’

c:/ruby/lib/ruby/gems/1.8/gems/activerecord-2.1.0/lib/active\_record/  
attribute\_methods.rb:251:in `method_missing' c:/ruby/lib/ruby/gems/1.8/gems/activerecord-2.1.0/lib/active_record/ base.rb:2361:in`send’  
c:/ruby/lib/ruby/gems/1.8/gems/activerecord-2.1.0/lib/active\_record/  
base.rb:2361:in `attributes=' c:/ruby/lib/ruby/gems/1.8/gems/activerecord-2.1.0/lib/active_record/ base.rb:2360:in`each’  
c:/ruby/lib/ruby/gems/1.8/gems/activerecord-2.1.0/lib/active\_record/  
base.rb:2360:in `attributes=' c:/ruby/lib/ruby/gems/1.8/gems/activerecord-2.1.0/lib/active_record/ base.rb:2130:in`initialize’  
c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action\_controller/  
base.rb:1162:in `send' c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action_controller/ base.rb:1162:in`perform\_action\_without\_filters’  
c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action\_controller/  
filters.rb:580:in `call_filters' c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action_controller/ filters.rb:573:in`perform\_action\_without\_benchmark’  
c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action\_controller/  
benchmarking.rb:68:in `perform_action_without_rescue' c:/ruby/lib/ruby/1.8/benchmark.rb:293:in`measure’  
c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action\_controller/  
benchmarking.rb:68:in `perform_action_without_rescue' c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action_controller/ rescue.rb:201:in`perform\_action\_without\_caching’  
c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action\_controller/  
caching/sql\_cache.rb:13:in `perform_action' c:/ruby/lib/ruby/gems/1.8/gems/activerecord-2.1.0/lib/active_record/ connection_adapters/abstract/query_cache.rb:33:in`cache’  
c:/ruby/lib/ruby/gems/1.8/gems/activerecord-2.1.0/lib/active\_record/  
query\_cache.rb:8:in `cache' c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action_controller/ caching/sql_cache.rb:12:in`perform\_action’  
c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action\_controller/  
base.rb:529:in `send' c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action_controller/ base.rb:529:in`process\_without\_filters’  
c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action\_controller/  
filters.rb:569:in `process_without_session_management_support' c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action_controller/ session_management.rb:130:in`process’  
c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action\_controller/  
base.rb:389:in `process' c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action_controller/ dispatcher.rb:149:in`handle\_request’  
c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action\_controller/  
dispatcher.rb:107:in `dispatch' c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action_controller/ dispatcher.rb:104:in`synchronize’  
c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action\_controller/  
dispatcher.rb:104:in `dispatch' c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action_controller/ dispatcher.rb:120:in`dispatch\_cgi’  
c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action\_controller/  
dispatcher.rb:35:in `dispatch' c:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.2-mswin32/lib/mongrel/ rails.rb:76:in`process’  
c:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.2-mswin32/lib/mongrel/  
rails.rb:74:in `synchronize' c:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.2-mswin32/lib/mongrel/ rails.rb:74:in`process’  
c:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.2-mswin32/lib/mongrel.rb:  
159:in `process_client' c:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.2-mswin32/lib/mongrel.rb: 158:in`each’  
c:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.2-mswin32/lib/mongrel.rb:  
158:in `process_client' c:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.2-mswin32/lib/mongrel.rb: 285:in`run’  
c:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.2-mswin32/lib/mongrel.rb:  
285:in `initialize' c:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.2-mswin32/lib/mongrel.rb: 285:in`new’  
c:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.2-mswin32/lib/mongrel.rb:  
285:in `run' c:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.2-mswin32/lib/mongrel.rb: 268:in`initialize’  
c:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.2-mswin32/lib/mongrel.rb:  
268:in `new' c:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.2-mswin32/lib/mongrel.rb: 268:in`run’  
c:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.2-mswin32/lib/mongrel/  
configurator.rb:282:in `run' c:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.2-mswin32/lib/mongrel/ configurator.rb:281:in`each’  
c:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.2-mswin32/lib/mongrel/  
configurator.rb:281:in `run' c:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.2-mswin32/bin/mongrel_rails: 128:in`run’  
c:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.2-mswin32/lib/mongrel/  
command.rb:212:in `run' c:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.2-mswin32/bin/mongrel_rails: 281 c:/ruby/lib/ruby/gems/1.8/gems/activesupport-2.1.0/lib/active_support/ dependencies.rb:502:in`load’  
c:/ruby/lib/ruby/gems/1.8/gems/activesupport-2.1.0/lib/active\_support/  
dependencies.rb:502:in `load' c:/ruby/lib/ruby/gems/1.8/gems/activesupport-2.1.0/lib/active_support/ dependencies.rb:354:in`new\_constants\_in’  
c:/ruby/lib/ruby/gems/1.8/gems/activesupport-2.1.0/lib/active\_support/  
dependencies.rb:502:in `load' c:/ruby/lib/ruby/gems/1.8/gems/rails-2.1.0/lib/commands/servers/ mongrel.rb:64 c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in`gem\_original\_require’  
c:/ruby/lib/ruby/site\_ruby/1.8/rubygems/custom\_require.rb:27:in  
`require' c:/ruby/lib/ruby/gems/1.8/gems/activesupport-2.1.0/lib/active_support/ dependencies.rb:509:in`require’  
c:/ruby/lib/ruby/gems/1.8/gems/activesupport-2.1.0/lib/active\_support/  
dependencies.rb:354:in `new_constants_in' c:/ruby/lib/ruby/gems/1.8/gems/activesupport-2.1.0/lib/active_support/ dependencies.rb:509:in`require’  
c:/ruby/lib/ruby/gems/1.8/gems/rails-2.1.0/lib/commands/server.rb:39  
c:/ruby/lib/ruby/site\_ruby/1.8/rubygems/custom\_require.rb:27:in  
`gem_original_require' c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in`require’  
script/server:3

c:/ruby/lib/ruby/gems/1.8/gems/activerecord-2.1.0/lib/active\_record/  
attribute\_methods.rb:251:in `method_missing' c:/ruby/lib/ruby/gems/1.8/gems/activerecord-2.1.0/lib/active_record/ base.rb:2361:in`send’  
c:/ruby/lib/ruby/gems/1.8/gems/activerecord-2.1.0/lib/active\_record/  
base.rb:2361:in `attributes=' c:/ruby/lib/ruby/gems/1.8/gems/activerecord-2.1.0/lib/active_record/ base.rb:2360:in`each’  
c:/ruby/lib/ruby/gems/1.8/gems/activerecord-2.1.0/lib/active\_record/  
base.rb:2360:in `attributes=' c:/ruby/lib/ruby/gems/1.8/gems/activerecord-2.1.0/lib/active_record/ base.rb:2130:in`initialize’  
app/controllers/public\_controller.rb:28:in `new' app/controllers/public_controller.rb:28:in`create’  
c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action\_controller/  
base.rb:1162:in `send' c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action_controller/ base.rb:1162:in`perform\_action\_without\_filters’  
c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action\_controller/  
filters.rb:580:in `call_filters' c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action_controller/ filters.rb:573:in`perform\_action\_without\_benchmark’  
c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action\_controller/  
benchmarking.rb:68:in `perform_action_without_rescue' c:/ruby/lib/ruby/1.8/benchmark.rb:293:in`measure’  
c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action\_controller/  
benchmarking.rb:68:in `perform_action_without_rescue' c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action_controller/ rescue.rb:201:in`perform\_action\_without\_caching’  
c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action\_controller/  
caching/sql\_cache.rb:13:in `perform_action' c:/ruby/lib/ruby/gems/1.8/gems/activerecord-2.1.0/lib/active_record/ connection_adapters/abstract/query_cache.rb:33:in`cache’  
c:/ruby/lib/ruby/gems/1.8/gems/activerecord-2.1.0/lib/active\_record/  
query\_cache.rb:8:in `cache' c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action_controller/ caching/sql_cache.rb:12:in`perform\_action’  
c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action\_controller/  
base.rb:529:in `send' c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action_controller/ base.rb:529:in`process\_without\_filters’  
c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action\_controller/  
filters.rb:569:in `process_without_session_management_support' c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action_controller/ session_management.rb:130:in`process’  
c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action\_controller/  
base.rb:389:in `process' c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action_controller/ dispatcher.rb:149:in`handle\_request’  
c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action\_controller/  
dispatcher.rb:107:in `dispatch' c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action_controller/ dispatcher.rb:104:in`synchronize’  
c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action\_controller/  
dispatcher.rb:104:in `dispatch' c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action_controller/ dispatcher.rb:120:in`dispatch\_cgi’  
c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action\_controller/  
dispatcher.rb:35:in `dispatch' c:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.2-mswin32/lib/mongrel/ rails.rb:76:in`process’  
c:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.2-mswin32/lib/mongrel/  
rails.rb:74:in `synchronize' c:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.2-mswin32/lib/mongrel/ rails.rb:74:in`process’  
c:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.2-mswin32/lib/mongrel.rb:  
159:in `process_client' c:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.2-mswin32/lib/mongrel.rb: 158:in`each’  
c:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.2-mswin32/lib/mongrel.rb:  
158:in `process_client' c:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.2-mswin32/lib/mongrel.rb: 285:in`run’  
c:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.2-mswin32/lib/mongrel.rb:  
285:in `initialize' c:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.2-mswin32/lib/mongrel.rb: 285:in`new’  
c:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.2-mswin32/lib/mongrel.rb:  
285:in `run' c:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.2-mswin32/lib/mongrel.rb: 268:in`initialize’  
c:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.2-mswin32/lib/mongrel.rb:  
268:in `new' c:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.2-mswin32/lib/mongrel.rb: 268:in`run’  
c:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.2-mswin32/lib/mongrel/  
configurator.rb:282:in `run' c:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.2-mswin32/lib/mongrel/ configurator.rb:281:in`each’  
c:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.2-mswin32/lib/mongrel/  
configurator.rb:281:in `run' c:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.2-mswin32/bin/mongrel_rails: 128:in`run’  
c:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.2-mswin32/lib/mongrel/  
command.rb:212:in `run' c:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.2-mswin32/bin/mongrel_rails: 281 c:/ruby/lib/ruby/gems/1.8/gems/activesupport-2.1.0/lib/active_support/ dependencies.rb:502:in`load’  
c:/ruby/lib/ruby/gems/1.8/gems/activesupport-2.1.0/lib/active\_support/  
dependencies.rb:502:in `load' c:/ruby/lib/ruby/gems/1.8/gems/activesupport-2.1.0/lib/active_support/ dependencies.rb:354:in`new\_constants\_in’  
c:/ruby/lib/ruby/gems/1.8/gems/activesupport-2.1.0/lib/active\_support/  
dependencies.rb:502:in `load' c:/ruby/lib/ruby/gems/1.8/gems/rails-2.1.0/lib/commands/servers/ mongrel.rb:64 c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in`gem\_original\_require’  
c:/ruby/lib/ruby/site\_ruby/1.8/rubygems/custom\_require.rb:27:in  
`require' c:/ruby/lib/ruby/gems/1.8/gems/activesupport-2.1.0/lib/active_support/ dependencies.rb:509:in`require’  
c:/ruby/lib/ruby/gems/1.8/gems/activesupport-2.1.0/lib/active\_support/  
dependencies.rb:354:in `new_constants_in' c:/ruby/lib/ruby/gems/1.8/gems/activesupport-2.1.0/lib/active_support/ dependencies.rb:509:in`require’  
c:/ruby/lib/ruby/gems/1.8/gems/rails-2.1.0/lib/commands/server.rb:39  
c:/ruby/lib/ruby/site\_ruby/1.8/rubygems/custom\_require.rb:27:in  
`gem_original_require' c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in`require’  
script/server:3

Request

Parameters:

{“artist”=\>[“Jack Johnson”],  
“commit”=\>“Create”,  
“title”=\>[“Sleep Through the Static”],  
“authenticity\_token”=\>“ae4530b9c7db12cb6ae7d7326d44b2f7d0bdf3e4”,  
“id”=\>[“2”],  
“genre”=\>[“Beautiful”],  
“release\_date”=\>{"(3i)"=\>“1”,  
“(4i)”=\>“00”,  
“(5i)”=\>“00”,  
“(1i)”=\>“2008”,  
“(2i)”=\>“1”}}

Show session dump

* * *

:csrf\_id: 4fe64497155d2f8d5dd1359e937beb49  
flash: !map:ActionController::Flash::FlashHash {}

Response

Headers:

{“cookie”=\>[],  
“Cache-Control”=\>“no-cache”}

---

<div class="post-metadata">

**Author:** ![A\_Love\_of\_Surf](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/d9b06d/32.png) [@A\_Love\_of\_Surf](https://www.ruby-forum.com/u/A_Love_of_Surf)\
**Post date:** [July 23, 2008, 1:28am UTC](https://www.ruby-forum.com/t/can-someone-please-help-a-very-eager-rails-newbie/143819/2 "2008-07-23T01:28:45Z")

</div>

On Jul 23, 12:19 am, A Love of Surf [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> ok, so I am trying to learn the ‘c’ in crud from a tutorial right  
> now. Using the source below, I am loading the action ‘new’, filling  
> out a form to create a new record, and submitting the form to save the  
> record. The problem comes when I submit the form. The app generates  
> an error saying that the method commit= is not defined. At this  
> point, I don’t know enough about rails to extrapolate meaning from  
> this weirdness or to know what I should include in this request that’d  
> help someone to help me.

The short version is that there are parameters that are submitted that  
don’t correspond to model attributes (eg the name of the button you  
clicked), so when you give Artists.new your params hash there are some  
keys it doesn’t know what to do with.

> Id: \<%= text\_field(:id, @album.id) %\>  
>   
> You don’t need an edit field for id.  
> Artist: \<%= text\_field(:artist, @album.artist) %\>

You’ve got the wrong pattern here. You should be doing  
text\_field ‘album’, ‘artist’  
(and similarly for the other ones)  
This tells rails 'I’m editing an album, and right now i’m looking at  
the artist attribute.  
This also makes what the user types appear as params[:album][:artist],  
so instead of doing  
Album.new params  
you do  
Album.new params[:album]  
and since params[:album only contains what you put there you won’t get  
the error message you got.  
Fred

---

<div class="post-metadata">

**Author:** ![A\_Love\_of\_Surf](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/d9b06d/32.png) [@A\_Love\_of\_Surf](https://www.ruby-forum.com/u/A_Love_of_Surf)\
**Post date:** [July 23, 2008, 1:39am UTC](https://www.ruby-forum.com/t/can-someone-please-help-a-very-eager-rails-newbie/143819/3 "2008-07-23T01:39:52Z")

</div>

alright! thanks so much for the speedy and helpful answer. the only  
thing that is more fun than ruby/rails is how awesome the community is  
=]

On Jul 22, 4:27 pm, Frederick C. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)

---

<div class="post-metadata">

**Author:** ![A\_Love\_of\_Surf](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/d9b06d/32.png) [@A\_Love\_of\_Surf](https://www.ruby-forum.com/u/A_Love_of_Surf)\
**Post date:** [July 23, 2008, 3:09am UTC](https://www.ruby-forum.com/t/can-someone-please-help-a-very-eager-rails-newbie/143819/4 "2008-07-23T03:09:45Z")

</div>

A Love of Surf wrote:

> def create  
> @album = Album.new(params)

Until you learn to use form\_for, or Hash#block, you must break out all  
the  
arguments to .new:

@album = Album.new(:artist =\> params[:artist],  
:title =\> params[:title],  
:etc =\> params[:etc])

Also, next time don’t worry about pasting the entire stack trace; it  
just fills  
up the servers, and we honestly won’t read a line of it!

–  
Phlip

---

<div class="post-metadata">

**Author:** ![A\_Love\_of\_Surf](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/d9b06d/32.png) [@A\_Love\_of\_Surf](https://www.ruby-forum.com/u/A_Love_of_Surf)\
**Post date:** [July 23, 2008, 3:15am UTC](https://www.ruby-forum.com/t/can-someone-please-help-a-very-eager-rails-newbie/143819/5 "2008-07-23T03:15:02Z")

</div>

ok, i’m sorry about putting that huge text in my post.

but, i dont know what you mean about paste…i typed that
