Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

My form_tag looks like:

<%= form_tag(:controller => "users", :action => "confirm", :method => "get") %>

the html output is:

<form accept-charset="UTF-8" action="/users/confirm?method=get" method="post">

Why is it doing this?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
674 views
Welcome To Ask or Share your Answers For Others

1 Answer

I think it's because when used in this form it assumes all of the options are url options. Try.

<%= form_tag( '/users/confirm', :method => :get ) %>

In this case you have two separate sets of options, url options and tag options.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
...