I am a little confused. If your HTML form shows this:

<form action="/orves/1705" ...

How can the action executed be this:

Processing OrvesController#update...

I would have thought the action executed was 'orves', receiving an id
with value 1705? I'm sorry if I'm off here. Routing has still many
mysteries for me.

Also, could it be that when you execute "@orf = Orf.find(params[:id])"
the 'find' is finding nothing? If that were the case @orf would not
even be an instance of Orf, it would be just nil, although I'm
guessing you'd get an ActiveRecord::RecordNotFound exception.

On Apr 7, 11:40 am, dirtbug <nyoun...@gmail.com> wrote:
> When I did create, it did make an object and a row in the database
> table.  When I go in thru mysql, I can see that it was able to fill
> three fields:  id (which is an autoincrement field), the created_at
> and updated_at fields, which got timestamps, but none of the info that
> I had entered into the boxes in the form made it into the db.
>
> On Apr 6, 3:58 pm, Colin Law <clan...@googlemail.com> wrote:
>
> > On 6 April 2010 20:30, dirtbug <nyoun...@gmail.com> wrote:
>
> > > Colin,
>
> > > The log now shows:
>
> > > Processing OrvesController#update (for 128.119.60.171 at 2010-04-06
> > > 14:48:28) [PUT]
> > >  Parameters: {"orf"=>nil, "commit"=>"Update", "id"=>"1705"}
>
> > Well, amazing, after fixing multiple problems the fundamental issue
> > remains unaffected!  Can anyone else see why the orf parameter is nil?
>
> > I have always used
> > <%= f.text_field :field_name ...
> > whereas I see you have
> > <%= f.text_field 'field_name'
> > but I would be surprised if this were the problem.  The html looks ok.
>
> > Does it work when creating a new orf record?
>
> > Colin
>
> > >   [4;36;1mOrf Columns (22.6ms) [0m    [0;1mSHOW FIELDS FROM
> > > `orves` [0m
> > >   [4;35;1mOrf Load (0.9ms) [0m    [0mSELECT * FROM `orves` WHERE
> > > (`orves`.`id` = 1705)  [0m
> > >   [4;36;1mSQL (0.2ms) [0m    [0;1mBEGIN [0m
> > >   [4;35;1mSQL (0.3ms) [0m    [0mCOMMIT [0m
> > > Redirected to /orves/1705
> > > Completed in 49ms (DB: 25) | 302 Found [http://
> > > andromeda.micro.umass.edu/orves/1705]
> > >   [4;36;1mSQL (0.4ms) [0m    [0;1mSET NAMES 'utf8' [0m
> > >   [4;35;1mSQL (0.3ms) [0m    [0mSET SQL_AUTO_IS_NULL=0 [0m
>
> > > Processing OrvesController#show (for 128.119.60.171 at 2010-04-06
> > > 14:48:28) [GET]
> > >  Parameters: {"id"=>"1705"}
> > >   [4;36;1mOrf Columns (18.5ms) [0m    [0;1mSHOW FIELDS FROM
> > > `orves` [0m
> > >   [4;35;1mOrf Load (0.9ms) [0m    [0mSELECT * FROM `orves` WHERE
> > > (`orves`.`id` = 1705)  [0m
> > > Rendering template within layouts/orves
> > > Rendering orves/show
> > > Completed in 96ms (View: 58, DB: 20) | 200 OK [http://
> > > andromeda.micro.umass.edu/orves/1705]
>
> > > On Apr 6, 3:02 pm, Colin Law <clan...@googlemail.com> wrote:
> > >> On 6 April 2010 19:26, dirtbug <nyoun...@gmail.com> wrote:
>
> > >> > Colin,
>
> > >> > I added a layout file that had gone missing and now it validates.  The
> > >> > html;
>
> > >> Well, that was a worthwhile exercise, even if it was not the cause of
> > >> the problem.
>
> > >> > <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
> > >> >       "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd";>
>
> > >> > <html xmlns="http://www.w3.org/1999/xhtml"; xml:lang="en" lang="en">
> > >> > <head>
> > >> >  <meta http-equiv="content-type" content="text/html;charset=UTF-8" />
> > >> >  <title>Orves: edit</title>
> > >> >  <link href="/stylesheets/baby.css?1270578037" media="screen"
> > >> > rel="stylesheet" type="text/css" />
> > >> > </head>
> > >> > <body>
>
> > >> > <p style="color: green"></p>
>
> > >> > <h1>Editing orf</h1>
>
> > >> > <form action="/orves/1705" class="edit_orf" id="edit_orf_1705"
> > >> > method="post"><div style="margin:0;padding:0"><input name="_method"
> > >> > type="hidden" value="put" /></div>
>
> > >> >  Gura_0317
> > >> >  <input id="orf_current_annotation" name="orf[current_annotation]"
> > >> > size="50" type="text" value="hypothetical protein" />
> > >> >        <input id="orf_submit" name="commit" type="submit" 
> > >> > value="Update" />
> > >> > </form>
>
> > >> > </body>
> > >> > </html>
>
> > >> > And the validation report:
>
> > >> > HTML Validator
> > >> >    0 errors, 0 warnings
>
> > >> > The validated page has no errors, no warning found by the SGML Parser
> > >> > and  HTML Tidy.
>
> > >> > But it still doesn't update the database.
>
> > >> The other thing I asked a few mails ago was what is shown in the log
> > >> when you click submit, now that you have corrected several problems.
>
> > >> Colin
>
> > > --
> > > You received this message because you are subscribed to the Google Groups 
> > > "Ruby on Rails: Talk" group.
> > > To post to this group, send email to rubyonrails-t...@googlegroups.com.
> > > To unsubscribe from this group, send email to 
> > > rubyonrails-talk+unsubscr...@googlegroups.com.
> > > For more options, visit this group 
> > > athttp://groups.google.com/group/rubyonrails-talk?hl=en.

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to rubyonrails-t...@googlegroups.com.
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.

Reply via email to