On Sep 15, 2009, at 7:04 PM, blueHandTalking wrote:
>
> O.K.,
>
> I added a couple of hidden fields to my form so I would actually have
> a NULL value \
> for 'id'
> Here is the output from the Apache access log:
>
> Processing PhotosController#upload_main (for 66.165.26.17 at
> 2009-09-15 22:43:43) [POST]
> Parameters: {"photo"=>{"project_id"=>"", "mainimg"=>#<File:/tmp/
> RackMultipart.26337.1>, "id"=>"", "user_id"=>"14"},
> "page_path"=>"projects/new",
> "authenticity_token"=>"3OFNLLHqAsAGm9il9CsPjRNhJzDE+L2ygiAQyyqzB7E=",
> "after_submit"=>"stay-here"}
>
> 'id' is definitely NULL now.
No, it will be "" (blank).
> @photo = Photo.find(params[:id])
>
> is causing an error?
This will throw an ActiveRecord::RecordNotFound - that line doesn't
make sense if params[:id] is blank.
--Matt Jones
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Hobo
Users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/hobousers?hl=en
-~----------~----~----~----~------~----~------~--~---