My database model's connection appears messed up


#1

I am trying to add data from a form, and the rails doesn’t appear to be
making
any effort at all. I’ve put deliberately erroneous data, but still
nothing.
All the development log shows is this.

This is the code in use - based on the example from Rails book

def add_customer_admin
if request.get?
@login = CustomerAdmin.new
else
@login = CustomerAdmin.new(params[:customer_admin])
STDERR.puts params
if
@login.save
else
# STDERR.puts “shitty outcome”
redirect_to(:action => :add_customer_admin)
end
end
end

I made some changes by doing a global cut and paste after I changed the
tablename, but it still does not explain why there are no errors. I
appears the
is no instruction attemmpting to insert the data into the table

Processing LoginController#add_customer_admin (for 127.0.0.1 at
2006-04-19
01:45:49) [POST]
Session ID: 34381c7b5af9cb7293c7bed8eddcf935
Parameters: {“action”=>“add_customer_admin”, “controller”=>“login”,
“customer_admin”=>{“firstnames”=>"", “adminlogin”=>“zzzzz”,
“surname”=>"",
“password”=>""}}
e[4;35;1mSQL (0.010000)e[0m e[0m SELECT a.attname,
format_type(a.atttypid,
a.atttypmod), d.adsrc, a.attnotnull
FROM pg_attribute a LEFT JOIN pg_attrdef d
ON a.attrelid = d.adrelid AND a.attnum = d.adnum
WHERE a.attrelid = ‘customer_admins’::regclass
AND a.attnum > 0 AND NOT a.attisdropped
ORDER BY a.attnum
e[0m
e[4;36;1mSQL (0.000000)e[0m e[0;1mBEGINe[0m
e[4;35;1mCustomerAdmin Load (0.000000)e[0m e[0mSELECT * FROM
customer_admins
WHERE (customer_admins.adminlogin = ‘zzzzz’) LIMIT 1e[0m
e[4;36;1mSQL (0.010000)e[0m e[0;1mCOMMITe[0m
Redirected to http://localhost:3000/login/add_customer_admin
Completed in 0.38100 (2 reqs/sec) | DB: 0.02000 (5%) | 302 Found
[http://localhost/login/add_customer_admin]

Processing LoginController#add_customer_admin (for 127.0.0.1 at
2006-04-19
01:45:51) [GET]
Session ID: 34381c7b5af9cb7293c7bed8eddcf935
Parameters: {“action”=>“add_customer_admin”, “controller”=>“login”}
e[4;35;1mSQL (0.030000)e[0m e[0m SELECT a.attname,
format_type(a.atttypid,
a.atttypmod), d.adsrc, a.attnotnull
FROM pg_attribute a LEFT JOIN pg_attrdef d
ON a.attrelid = d.adrelid AND a.attnum = d.adnum
WHERE a.attrelid = ‘customer_admins’::regclass
AND a.attnum > 0 AND NOT a.attisdropped
ORDER BY a.attnum
e[0m
Rendering login/add_customer_admin
Completed in 0.67100 (1 reqs/sec) | Rendering: 0.41100 (61%) | DB:
0.03000 (4%)
| 200 OK [http://localhost/login/add_customer_admin]