我想使用设计gem来做用户注册模块。我按照官方设计网站上的说明去做。我把电子邮件栏名改成了"contact"。我对注册模块的测试现在收到错误:
NoMethodError at /users undefined method `email` for #<User:0x007f64aa0033c0>
user.rb:
class User < ActiveRecord::Base
devise :database_authenticatable, :registerable,
:recoverable, :rememberable, :trackable, :validatable
end
视图/设计/注册/new.html.erb:
<div class="field">
<%= f.label :contact %>
<div class="ui action input">
<%= f.email_field :contact, class: "verification-contact", require: true %>
<a class="ui button verification-button">Get Code</a>
</div>
</div>
如果您想使用任何其他字段,请点击此链接发送电子邮件
仅仅将电子邮件名称更改为联系人可能没有帮助。设计提供了对定制的全面支持,但它必须是一步一步的