Rails:多步新用户注册表单(FSM?) [英] Rails: Multi-Step New User Signup Form (FSM?)

查看:28
本文介绍了Rails:多步新用户注册表单(FSM?)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已阅读 高级 Rails 食谱中的创建多步向导".我还阅读并重新阅读了我正在使用的更新 FSM 文档,称为 Workflow,并且看了这里这里.Advanced Rails Recipe 侧重于已经存在的记录(测验),不包括创建新记录.工作流文档不包括控制器或视图的任何代码,所以我不知道如何处理所有这些模型魔术,最后两个链接也几乎没有涉及实现.从上述资源中,我对 Rails 中的 FSM 是什么以及如何在控制台或 IRB 中使用它有很好的了解,但我对如何将其实现到我的 Rails 应用程序中几乎没有方向或了解.

I've read the "Create Multi-Step Wizard" in Advanced Rails Recipes. I've also read and re-read the documentation for the updated FSM I'm using called Workflow, and looked here and here. The Advanced Rails Recipe focuses on records (quizzes) that already exist, and doesn't cover creating new ones. The Workflow docs don't cover any code for controllers or views, so I've no idea what to do with all this model magic, and the last two links barely touch on implementation either. From the aforementioned resources, I have a good understanding of what a FSM in Rails is and how to play with it in the console or IRB, but I've got very little direction or understanding how to implement one into my Rails app.

我想要的是:一个简单的、多步骤的用户注册过程.

What I would like is this: a simple, multi-step user signup process.

第 1 步:用户输入他们的评论详细信息(带验证).

Step 1: User enters in their critical details (with validations).

第 2 步:用户输入他们的搜索标准,对于他们的个人资料(与验证).

Step 2: User enters in their search criteria, for their profile (with validations).

第 3 步:用户同意条款服务(带验证).

Step 3: User agrees to the Terms of Service (with validations).

第 4 步:用户受到欢迎确认页面,包括一个链接将他们带到他们新创建的帐户.

Step 4: User is greeted by a confirmation page, including a link that takes them to their newly created account.

我还想在步骤之间进行完整导航,并在每次转换时进行完整捕获(保存到数据库).

I'd also like full navigation between the steps and full capture (saves to the database) with each transition.

有人可以给我一个类似于此的明确实现吗?我会喜欢一个包含多步注册过程的示例应用程序,我可以在其中查看代码(完整的源代码——模型和控制器和视图),但我一直找不到类似的东西.

Can someone please give me a clear implementation of something similar to this? I would LOVE an example app that includes a multi-step signup process where I can look at the code (FULL source code--models AND controllers and views) under the hood, but I've been unable to find anything like that.

任何指导将不胜感激!

请帮助将其设为 Railscast!Ryan B.(又名超人),如果你正在阅读这篇文章,我们需要你!http://feedback.railscasts.com/forums/77-episode-suggestions/suggestions/35553-multi-step-forms-and-wizards

Please help make this a Railscast! Ryan B. (a.k.a. Superman), if you're reading this, we need you! http://feedback.railscasts.com/forums/77-episode-suggestions/suggestions/35553-multi-step-forms-and-wizards

推荐答案

Ryan B. 为此http://railscasts.com/episodes/217-multistep-forms .

Ryan B. has created a screencast for this http://railscasts.com/episodes/217-multistep-forms .

干杯,克里斯蒂

这篇关于Rails:多步新用户注册表单(FSM?)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆