M
miriamraphael
I am writing my first rails script and am having lots of trouble doing
the simplest tasks.
Right now, I have a form (new.rhtml) and it allows someone to become a
new user by entering their info (username, password, name, etc).
the form calls the 'create' routine which is supposed to save it to
the DB. However, the data is not being saved. How can I debug this? I
am a perl scripter and with Perl I know how to find out where the bugs
are, but because I'm new to ruby/rails, I can't figure this out.
Here is the form:
<form action="/user/create" method="post">
<table width=400>
<tr bgcolor="#999999"><td colspan=2>Please choose a username and
password to create your account</tr>
<tr><td>User Name*:</td><td><input id="username" name="user[username]"
maxlength=12 type=text></tr>
<tr><td>Password*:</td><td><input id="password" name="user[password]"
maxlength=12 type=password></tr>
<tr bgcolor="#999999"><td colspan=2>Account Information</td></tr>
<tr><td>Company Name*:</td><td><input id="company_name"
name="user[company_name]" maxlength=25 type=text></td></tr>
<tr><td>First Name*:</td><td><input id="first_name"
name="user[first_name]" maxlength=25 type=text></td></tr>
<tr><td>Last Name*:</td><td><input id="last_name"
name="user[last_name]" maxlength=25 type=text></td></tr>
<tr><td>Email Address*:</td><td><input id="email" name="user(e-mail address removed)
the simplest tasks.
Right now, I have a form (new.rhtml) and it allows someone to become a
new user by entering their info (username, password, name, etc).
the form calls the 'create' routine which is supposed to save it to
the DB. However, the data is not being saved. How can I debug this? I
am a perl scripter and with Perl I know how to find out where the bugs
are, but because I'm new to ruby/rails, I can't figure this out.
Here is the form:
<form action="/user/create" method="post">
<table width=400>
<tr bgcolor="#999999"><td colspan=2>Please choose a username and
password to create your account</tr>
<tr><td>User Name*:</td><td><input id="username" name="user[username]"
maxlength=12 type=text></tr>
<tr><td>Password*:</td><td><input id="password" name="user[password]"
maxlength=12 type=password></tr>
<tr bgcolor="#999999"><td colspan=2>Account Information</td></tr>
<tr><td>Company Name*:</td><td><input id="company_name"
name="user[company_name]" maxlength=25 type=text></td></tr>
<tr><td>First Name*:</td><td><input id="first_name"
name="user[first_name]" maxlength=25 type=text></td></tr>
<tr><td>Last Name*:</td><td><input id="last_name"
name="user[last_name]" maxlength=25 type=text></td></tr>
<tr><td>Email Address*:</td><td><input id="email" name="user(e-mail address removed)