我已经安装了设计,它工作得很好。但我不知道如何使用设计消息。我浏览了设计维基,但我没有得到它。
当用户成功注册后,devise 只是重定向到主页,不显示任何内容。我检查了 devise.en.yml 并发现了这个:
signed_up_but_unconfirmed: 'A message with a confirmation link has been sent to your email address. Please open the link to activate your account.'
希望在注册重定向的主页上显示此内容。
我的注册控制器是:
class RegistrationsController < Devise::RegistrationsController
def new
resource = build_resource({})
resource.build_profile
respond_with resource
end
end
我的注册表单是:
<div class = "form-signin">
<h2 class="form-signin-heading">Please sign up</h2>
<%= form_for(resource, :as => resource_name, :url => registration_path(resource_name)) do |f| %>
<%= devise_error_messages! %>
<%= f.email_field :email, :autofocus => true, :class => "input-block-level", :placeholder => "Email address" %>
<%= f.password_field :password, :class => "input-block-level", :placeholder => "Password" %>
<%= f.password_field :password_confirmation, :class => "input-block-level", :placeholder => "Retype the password" %>
<div><%= f.submit "Sign up", :class => "btn btn-large btn-primary" %></div>
<% end %>
<%= render "devise/shared/links" %>
</div>
</div>
如何在主页上获取此消息?