23 Jul 01:19
Can someone please help a very eager Rails newbie?
From: A Love of Surf <wetlife@...>
Subject: Can someone please help a very eager Rails newbie?
Newsgroups: gmane.comp.lang.ruby.rails
Date: 2008-07-22 23:19:29 GMT
Subject: Can someone please help a very eager Rails newbie?
Newsgroups: gmane.comp.lang.ruby.rails
Date: 2008-07-22 23:19:29 GMT
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
(Continue reading)
RSS Feed