hi,
Does anyone out there know how to display database creation errors?
I''ve got a system to track tasks, here''s the create code:
def create
@task = Task.new(params[:task])
if @task.save
flash[:notice] = ''Task was successfully created.''
redirect_to :action => ''list''
else
flash[:notice] = ''Error saving task!''
render :action => ''new''
end
end
I''m getting the "Error saving task!" error, but I
can''t figure out what
the problem is. Any way to dump the SQL error?
Thanks,
-John
--
Posted via http://www.ruby-forum.com/.
Look in your development log... b John Stackhouse wrote:> hi, > > Does anyone out there know how to display database creation errors? > I''ve got a system to track tasks, here''s the create code: > > def create > @task = Task.new(params[:task]) > if @task.save > flash[:notice] = ''Task was successfully created.'' > redirect_to :action => ''list'' > else > flash[:notice] = ''Error saving task!'' > render :action => ''new'' > end > end > > I''m getting the "Error saving task!" error, but I can''t figure out what > the problem is. Any way to dump the SQL error? > > Thanks, > -John >