2013-05-24 3 views
0

Rails 3.2.9 응용 프로그램에 devise를 사용하고 있습니다. 가입과 관련하여 확인과 관련된 알림 (아래의 devise.en.yml 파일, en, devise, confirmations)은 표시되지 않습니다. 가입 후 사용자는 알림없이 페이지에 로그인하도록 리디렉션되지만 이메일은 전송됩니다.Rails 3 & Devise : 등록 확인과 관련된 알림

en: 
    devise: 
    confirmations:#THESE ARE NOT WORKING 
     confirmed: "Your account was successfully confirmed. You are now signed in." 
     send_instructions: "You will receive an email with instructions about how to confirm your account in a few minutes." 
     send_paranoid_instructions: "If your email address exists in our database, you will receive an email with instructions about how to confirm your account in a few minutes." 
    failure:#WORKS 
     already_authenticated: "You are already signed in." 
     inactive: "Your account was not activated yet." 
     invalid: "Invalid email or password." 
     invalid_token: "Invalid authentication token." 
     locked: "Your account is locked." 
     not_found_in_database: "Invalid email or password." 
     timeout: "Your session expired, please sign in again to continue." 
     unauthenticated: "You need to sign in or sign up before continuing." 
     unconfirmed: "You have to confirm your account before continuing." 
    mailer: 
     confirmation_instructions: 
     subject: "Confirmation instructions" 
     reset_password_instructions: 
     subject: "Reset password instructions" 
     unlock_instructions: 
     subject: "Unlock Instructions" 
    #some code.. 

: 사용자가 이메일에서 확인 링크를 클릭하면 그는

devise.en.yml를 로그인하거나 성공적으로 가입에 예고없이 다시, 응용 프로그램의 시작 페이지로 리디렉션 것 편집 : 당신은 당신의 application.html.erb에 다음 줄을 추가해야

en: 
    devise: 
    confirmations: 
     confirmed: "Your account was successfully confirmed. You are now signed in." 
     send_instructions: "You will receive an email with instructions about how to confirm your account in a few minutes." 
     send_paranoid_instructions: "If your email address exists in our database, you will receive an email with instructions about how to confirm your account in a few minutes." 
    failure: 
     already_authenticated: "You are already signed in." 
     inactive: "Your account was not activated yet." 
     invalid: "Invalid email or password." 
     invalid_token: "Invalid authentication token." 
    -----------#SOME CODE--------------- 
    user_registrations: 
     user: 
     destroyed: "Bye! Your account was successfully cancelled. We hope to see you again soon." 
     signed_up: "Welcome! You have signed up successfully." 
     signed_up_but_inactive: "You have signed up successfully. However, we could not sign you in because your account is not yet activated." 
     signed_up_but_locked: "You have signed up successfully. However, we could not sign you in because your account is locked." 
     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." 
     update_needs_confirmation: "You updated your account successfully, but we need to verify your new email address. Please check your email and click on the confirm link to finalize confirming your new email address." 
     updated: "You updated your account successfully." 
    -----------#SOME CODE--------------- 

답변

0

:

,536,
<p class="notice"><%= notice %></p> 
<p class="alert"><%= alert %></p> 
+0

layout.html.erb라는 app/views/layouts의 다른 레이아웃 파일을 사용하고 있으며 모든 컨트롤러에서 같은 것을 사용하고 있습니다. layout.html.erb 및 application.html.erb에 다음 코드가 있습니다. <% flash.each do | name, msg | %> \t \t <% = content_tag : 섹션, MSG : ID => "플래시 _ # {이름}": 클래스 => "플래시"%> \t \t <% end %> –

+0

난 잘 모르겠지만, 시도 : 클래스 = > "# {name}" – sunny1304

+0

내 질문에 왜 확인 알림 만 작동하지 않는거야? 그것은 다른 사람들을 위해 일합니다! –

관련 문제