设计 - 一个模型和多个不同的注册视图 [英] Devise - One Model and Multiple Different Registration Views
问题描述
我已经在静态注册页面上创建了一个定价表,该页面有三个选项。 A级,B级和C级。
我想要将注册选项传递给参数,或为不同的选项创建单独的视图,但使用相同的用户
我不太确定哪种方式去,或者如何自定义设计方式来处理这个问题。
任何输入将不胜感激!我们是rails新手。
1)将一个属性subscription_level放入您的用户模型中
2)创建视图,确定 current_user.subscription_level
的值是
,并根据其值显示不同的内容。 ..
I want to use Devise for authentication in rails 3.1.
I've created a pricing table on a static "signup" page that has three options. Level A, B and C.
I want to either pass the signup selection to devise as a parameter, or create separate views for the different options, but use the same User model.
I'm not really sure which way to go, or how to customize devise in a way to handle this.
Any input would be greatly appreciated! We're rails newbies.
1) put an attribute "subscription_level" into your user model
2) create views which determine what the value of current_user.subscription_level
is,
and which display different content depending on it's value...
这篇关于设计 - 一个模型和多个不同的注册视图的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!