【发布时间】:2012-06-17 17:07:53
【问题描述】:
我正在尝试制作一个简单的表单,但效果不太好。 这是我当前的表单代码:
%form{ :controller => 'tool', :action => 'activation', :method => 'post' }
%table{ :border => 0, :width => "100%", :height => "100%" }
%tr{ :align => "center", :valign => "center" }
%td
%input{ :type => "text", :name => "accountName" }
%input{ :type => "submit", :name => "submit", :value => "login" }
我在尝试通过表单发送数据时收到此网址:10.0.0.2:3000/activation。
我知道我可以通过路由tool#activation 激活,但这是错误的方式,我想将帖子查询发送到10.0.0.2:3000/tool/activation,但据我所知:action => 'tool/activation' 也是一个不好的方式。
你能给我建议吗?
【问题讨论】:
标签: ruby-on-rails forms haml