Ruby rails console 什么时候变这么强大了啊,第一次看命令行里有这么神奇的辅助显示。另外为啥更新这个操作一般都需要两个 action 来做(new create)用办法合起来么?

zzz6519003 · April 30, 2023 · Last by steve replied at April 30, 2023 · 419 hits

RT

我好像明白了 难道是因为 new 需要一个页面,create 才是真的 update

new 路由到空白的表单页面,create 保存表单数据

Reply to steve

路由到空白的表单页面?就是说空白表单也需要一个@model

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