frannyzooey-ee4meeAH724@public.gmane.org
2005-Mar-02 17:17 UTC
form action in mail (actionmailer)
Hi everyone. : )
I meet problem when use form tag in actionmailer. (content-type is text/html,
surely)
I want to use form action in actionmailer''s view (.rhtml) for some
reason.
1. I use start_form_tag helper method as normally, but how I can ?
I did <%= start_form_tag :action =>
"http://myhostname/mycontroller/myaction" %> or
<%= start_form_tag :action => "myaction", :action_prefix =>
"http://myhostname/mycontroller" %>
but met same errors
/gems/actionpack-1.3.1/lib/action_view/helpers/url_helper.rb:11:in
`send''
/gems/actionpack-1.3.1/lib/action_view/helpers/url_helper.rb:11:in
`url_for''
/gems/actionpack-1.3.1/lib/action_view/helpers/tag_helper.rb:35:in
`start_form_tag''
(erb):5:in `render_template''
2. so I changed my appoach to plain html likes
<form action="http://myhostname/mycontroller/myaction"
method="post">
blah blah, most hidden type
<input type="submit">
</form>
then, when I click submit from mail client, Rails identify it as "get
request" not "post request".
What happend?
Thanks for any advance : )
> 2. so I changed my appoach to plain html likes > > <form action="http://myhostname/mycontroller/myaction" method="post"> > blah blah, most hidden type > <input type="submit"> > </form> > > then, when I click submit from mail client, Rails identify it as "get > request" not "post request". >I found it worked as I expected (request "post" action) in web browser mail client. Actually, I suppose above problem come out only Mail.app (mac). Is there anyone who explain this case ? : ) Thanks for any advance,
Again : ) I found each mail client has their own method to process ''form action'' in text/html mail. For example, Gmail modify hidden input''s name with their prefix id string. (ex. <input type="hidden" name="account[something]"> is modified to <input type="hidden" name="120231232account[something]"> ) Surely I can use pattern matching to solve this problem but I think it is risky way. So I will be happy if someone explain know-how about ''form action'' in html mail. Thanks for any advance 2005. 03. 03, 오전 5:50, See more glass 작성:>> 2. so I changed my appoach to plain html likes >> >> <form action="http://myhostname/mycontroller/myaction" method="post"> >> blah blah, most hidden type >> <input type="submit"> >> </form> >> >> then, when I click submit from mail client, Rails identify it as >> "get request" not "post request". >> > > I found it worked as I expected (request "post" action) in web browser > mail client. > Actually, I suppose above problem come out only Mail.app (mac). > > Is there anyone who explain this case ? : ) > > Thanks for any advance, > > _______________________________________________ > Rails mailing list > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails