Rails 新手关于 view call controller 里的 method

jair · September 11, 2012 · Last by jair replied at September 11, 2012 · 2334 hits

我想在 page 里加一个自定的 button,点击这个 button,调用 controller 里的一个方法。并且把 page 上填写的内容,传入到 controller 里的一个 method 中去,不需要存入数据库,这个应该怎么写?希望各位给些示例 code。

在 button click 事件中加入 form.submit() 就可以了...

怎么指定调用那个 method 的呢?

#1 楼 @secondrocker 怎么指定调用那个 method 的呢?

You need to Sign in before reply, if you don't have an account, please Sign up first.