0
我目前正在使用设计进行用户注册,并希望根据域名@ company.com或@ work.com限制注册。其目的是让用户只提供他们电子邮件地址的第一部分,例如“lucy.dale”,然后从下拉菜单中选择他们的域名,如@ company.com。请参阅到目前为止,我已经生成的代码..编辑设计电子邮件格式
<div><%= f.label :email %><br />
<%= f.text_field :first_email, :autofocus => true %><%= f.select :domain, options_for_select([["Select One", ""], "@company.com", "@work.com", "@office.com"]) %>
由于我没有访问设计控制器或邮寄,请你能告诉我我如何可以加入:first_email &:域属性在将它传递给Devise中的默认电子邮件属性之前,先给([email protected])。
感谢您的帮助提前
重写registration_controller,并有覆盖build_resource – apneadiving
Hi apneadiving。由于我是一个新手,控制器有点棘手。在将它传递给Devise之前,有没有办法加入:first_email和:domian:email? – tdops