Cutting Peter
2005-Feb-16  13:35 UTC
Re: Is this correct: <form action="../send_email/<%= Solved
Hi
The earlier suggestions were almost right but not quite. Thanks!
Below is the correct placement of the fields
Peter
<%= start_form_tag( { :action=>"send_email" ,:id=>@user.id},
{ :name => ''email_user'' } ) %>
-----Original Message-----
From: rails-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org
[mailto:rails-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org] On
Behalf Of rails-request-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org
Sent: Wednesday, February 16, 2005 1:00 PM
To: rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org
Subject: Rails Digest, Vol 5, Issue 94
Send Rails mailing list submissions to
	rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org
To subscribe or unsubscribe via the World Wide Web, visit
	http://lists.rubyonrails.org/mailman/listinfo/rails
or, via email, send a message with subject or body ''help'' to
	rails-request-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org
You can reach the person managing the list at
	rails-owner-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org
When replying, please edit your Subject line so it is more specific
than "Re: Contents of Rails digest..."
Today''s Topics:
   1. Re: Is this correct: <form action="../send_email/<%=	@user.id
      (Cutting Peter)
   2. Re: Re: Is this correct: <form action="../send_email/<%     
@user.id (David Heinemeier Hansson)
   3. Re: sharing data between threads (David Heinemeier Hansson)
   4. Re: Re: Is this correct: <form action="../send_email/<%     
@user.id (Ben Schumacher)
   5. Re: Re: Is this correct: <form action="../send_email/<%     
@user.id (Ben Schumacher)
   6. Re: Introduce yourself and your project -- Round 2
      (David Heinemeier Hansson)
   7. Re: Introduce yourself and your project -- Round 2 (Massimo Nervi)
   8. Re: Routes Beta Comments (Stefan Arentz)
----------------------------------------------------------------------
Message: 1
Date: Wed, 16 Feb 2005 10:54:04 +0100
From: "Cutting Peter"
<Peter.Cutting-CwpgxV1jTAxWk0Htik3J/w@public.gmane.org>
Subject: [Rails] Re: Is this correct: <form action="../send_email/<%
@user.id
To: <rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org>
Message-ID:
	<5C06CD69C7232049BDB9E9C5F108059D9F3A18-10z1kjddZPsX0HDfWiRQWPJqs1qxboWOAR1GrE1ikU4@public.gmane.org>
	
Content-Type: text/plain;	charset="US-ASCII"
<%= start_form_tag :action=>"send_mail", :id=>@user.id %>
Works nicely but I cant seem to "name" the form
Eg
<%= start_form_tag :action=>"send_mail",
:name=>"formname",
:id=>@user.id %>
so that I can then reference it in the JS call. Doh!
<body onLoad="document.formname.message.focus()">
I have tried option name, form_name and formname  
Peter
------------------------------
Message: 2
Date: Wed, 16 Feb 2005 11:18:50 +0100
From: David Heinemeier Hansson
<david-OiTZALl8rpK0mm7Ywyx6yg@public.gmane.org>
Subject: Re: [Rails] Re: Is this correct: <form
	action="../send_email/<%=	@user.id
To: rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org
Message-ID:
<3611b47bfe0ed5172cfbc4f063b4a068-OiTZALl8rpK0mm7Ywyx6yg@public.gmane.org>
Content-Type: text/plain; charset=US-ASCII; format=flowed
> <%= start_form_tag :action=>"send_mail",
:name=>"formname",
> :id=>@user.id %>
The start_form_tag takes two hash parameters. One with options for the 
action, one for the html, so you need:
<%= start_form_tag({ :action=>"send_mail",
:name=>"formname" }, {
:id=>@user.id }) %>
--
David Heinemeier Hansson,
http://www.basecamphq.com/   -- Web-based Project Management
http://www.rubyonrails.org/  -- Web-application framework for Ruby
http://www.loudthinking.com/ -- Broadcasting Brain
------------------------------
Message: 3
Date: Wed, 16 Feb 2005 11:20:27 +0100
From: David Heinemeier Hansson
<david-OiTZALl8rpK0mm7Ywyx6yg@public.gmane.org>
Subject: Re: [Rails] sharing data between threads
To: rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org
Message-ID:
<30f32d5f94f4ec47ff8baec17063e4d8-OiTZALl8rpK0mm7Ywyx6yg@public.gmane.org>
Content-Type: text/plain; charset=US-ASCII; format=flowed
> I guess the best approach is push the data i need into the database, 
> is that what more experienced railers would think of as the-rails-way?
You definitely want to stay away from threads. They won''t work at all 
under fcgi, mod_ruby, or cgi. Push integration to a shared source 
that''ll enable you to scale with. Either database, DRb, or memcached. 
I''d recommend trying the database first.
--
David Heinemeier Hansson,
http://www.basecamphq.com/   -- Web-based Project Management
http://www.rubyonrails.org/  -- Web-application framework for Ruby
http://www.loudthinking.com/ -- Broadcasting Brain
------------------------------
Message: 4
Date: Wed, 16 Feb 2005 11:22:26 +0100
From: Ben Schumacher
<benschumacher-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Subject: Re: [Rails] Re: Is this correct: <form
	action="../send_email/<%=	@user.id
To: rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org
Message-ID:
<9859143f050216022223f6606d-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
Content-Type: text/plain; charset=US-ASCII
I think this is something that needs to be documented better, but
since start_form_tag takes two different hashes, it''s best to wrap
them in { } to differentiate between them.
The fix is:
<%= start_form_tag( { :action=>"send_mail" }, { :id=>@user.id
} ) %>
Note the parenthesis and the curly brackets.
(Just FYI, this was covered in an earlier thread -- in the archives at:
http://one.textdrive.com/pipermail/rails/2005-February/thread.html#2797)
Cheers,
bs.
On Wed, 16 Feb 2005 10:54:04 +0100, Cutting Peter
<Peter.Cutting-CwpgxV1jTAxWk0Htik3J/w@public.gmane.org>
wrote:> <%= start_form_tag :action=>"send_mail", :id=>@user.id
%>
> 
> Works nicely but I cant seem to "name" the form
> Eg
> 
> <%= start_form_tag :action=>"send_mail",
:name=>"formname",
> :id=>@user.id %>
> 
> so that I can then reference it in the JS call. Doh!
> 
> <body onLoad="document.formname.message.focus()">
> 
> I have tried option name, form_name and formname
> 
> Peter
> 
> _______________________________________________
> Rails mailing list
> Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org
> http://lists.rubyonrails.org/mailman/listinfo/rails
>
------------------------------
Message: 5
Date: Wed, 16 Feb 2005 11:23:30 +0100
From: Ben Schumacher
<benschumacher-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Subject: Re: [Rails] Re: Is this correct: <form
	action="../send_email/<%=	@user.id
To: rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org
Message-ID:
<9859143f050216022333e5928-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
Content-Type: text/plain; charset=US-ASCII
And of course, I can''t seem to post to this list without messing up my
copying and pasting, but it should be:
<%= start_form_tag( { :action=>"send_mail" }, { :name =>
''formname'',
:id=>@user.id } ) %>
On Wed, 16 Feb 2005 11:22:26 +0100, Ben Schumacher
<benschumacher-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
wrote:> I think this is something that needs to be documented better, but
> since start_form_tag takes two different hashes, it''s best to wrap
> them in { } to differentiate between them.
> 
> The fix is:
> 
> <%= start_form_tag( { :action=>"send_mail" }, {
:id=>@user.id } ) %>
> 
> Note the parenthesis and the curly brackets.
> 
> (Just FYI, this was covered in an earlier thread -- in the archives at:
> http://one.textdrive.com/pipermail/rails/2005-February/thread.html#2797)
> 
> Cheers,
> 
> bs.
> 
> On Wed, 16 Feb 2005 10:54:04 +0100, Cutting Peter
> <Peter.Cutting-CwpgxV1jTAxWk0Htik3J/w@public.gmane.org> wrote:
> > <%= start_form_tag :action=>"send_mail",
:id=>@user.id %>
> >
> > Works nicely but I cant seem to "name" the form
> > Eg
> >
> > <%= start_form_tag :action=>"send_mail",
:name=>"formname",
> > :id=>@user.id %>
> >
> > so that I can then reference it in the JS call. Doh!
> >
> > <body onLoad="document.formname.message.focus()">
> >
> > I have tried option name, form_name and formname
> >
> > Peter
> >
> > _______________________________________________
> > Rails mailing list
> > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org
> > http://lists.rubyonrails.org/mailman/listinfo/rails
> >
>
------------------------------
Message: 6
Date: Wed, 16 Feb 2005 11:24:29 +0100
From: David Heinemeier Hansson
<david-OiTZALl8rpK0mm7Ywyx6yg@public.gmane.org>
Subject: Re: [Rails] Introduce yourself and your project -- Round 2
To: rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org
Message-ID:
<3f4b8739bd60569159529de5b92123ba-OiTZALl8rpK0mm7Ywyx6yg@public.gmane.org>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
> A big Cheers!! to David for packaging up all of your hard work and 
> continuing development! Have you an address that we can all send 
> postcards to?
Haha. I remember that from the good ol'' days of Amiga software. The 
"postcardware". Register by sending a postcard.
Well, sure:
David Heinemeier Hansson
Hyacintvej 16 st
2300 København S
DENMARK
Send away :)
--
David Heinemeier Hansson,
http://www.basecamphq.com/   -- Web-based Project Management
http://www.rubyonrails.org/  -- Web-application framework for Ruby
http://www.loudthinking.com/ -- Broadcasting Brain
------------------------------
Message: 7
Date: Wed, 16 Feb 2005 12:14:10 +0100
From: "Massimo Nervi" <maner-G/4Acn03FKk@public.gmane.org>
Subject: Re: [Rails] Introduce yourself and your project -- Round 2
To: "rails"
<rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org>
Message-ID:
<IC04JM$FBBAA977ED16BD12B1D26F574BCEE4A3-VGgt2q2+T+FeoWH0uzbU5w@public.gmane.org>
Content-Type: text/plain; charset=iso-8859-1
Hi,
My name is Massimo Nervi, from Genova, Italy. I''m new to RailsOnRuby
and Ruby
but very interested on it. Currently, I''m working on OLAP projects.
I''m also a
open-source java developer.
Massimo
Curt Hibbs wrote:
>On December 14th, 2004 David Heinemeier Hansson sent this to the 
>mailing
>list:
>
>  I''m seeing a lot of new names on the list. Could  we perhaps do a
> round of introductions? That would  also be a great first post, if you 
> haven''t had a  chance to contribute yet. The basics should include
> your name, your organization, your country and city,  and the project 
> you''re currently working on.
>
>Its been a couple months since then (ancient history in Rails-time), 
>I''m updating my Rails presentation, and I''d like to
include some
>information about what is being done with Rails.
>
>Below I listed all of the responses from the first round. If your 
>response is no longer current, please post a correction. If you missed 
>the first round of introductions, please use this as an excuse to let 
>everyone know what you are doing.
>
>Thanks,
>Curt
____________________________________________________________
Navighi a 2 MEGA e i primi 3 mesi sono GRATIS. 
Scegli Libero Adsl Flat senza limiti su http://www.libero.it
------------------------------
Message: 8
Date: Wed, 16 Feb 2005 12:19:57 +0100
From: Stefan Arentz
<stefan.arentz-Ec4imsIGGIrYtjvyW6yDsg@public.gmane.org>
Subject: Re: [Rails] Routes Beta Comments
To: rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org
Message-ID:
<0b88304a1676ce8c6964d35272ac45c9-Ec4imsIGGIrYtjvyW6yDsg@public.gmane.org>
Content-Type: text/plain; charset=US-ASCII; format=flowed
On Feb 16, 2005, at 10:19 AM, Pete Yandell wrote:
> The trick is that it''s not a "Page not found" error,
it''s a "Not
> found" error. Whatever query you''re doing based on the id is
failing
> because you''re using id, not post_id, and this is throwing the
"Not
> found" error to indicate that no record can be found.
This is not true; Routes seem to capture any error. I just change 
Post.find() to Poooost.find() and I still get the Not Found error. This 
is extremely confusing and not appropriate for the development 
environment. The Routes module apparently reinvented the wheel for 
error handling. Which is wrong imo, as we already had that in place. 
All it has to do is dispatch to the right controller and let 
ActiveController::Base do it''s usual exception handling.
> I agree that the display of this error could provide a more useful 
> description.
I would really prefer the original style of error reporting.
  S.
------------------------------
_______________________________________________
Rails mailing list
Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org
http://lists.rubyonrails.org/mailman/listinfo/rails
End of Rails Digest, Vol 5, Issue 94
************************************