Rails 3.2.13
및 devise 2.2.3
을 사용하여 로그인하고 대시 보드에 입장 할 수있는 일반 사용자가 있습니다. 내가 devise로 다른 사용자를 만들고 별도의보기, 컨트롤러 및 모델로 만들었을 때, 같은 방식으로 작동하지 않습니다. 나는 심지어 user와 같은 방식으로 user1 연관을 모델링했다. 이제는 문서를 읽는 데 너무 많은 어림짐작을 사용하여 뭔가를 놓치고 있다는 것을 이해합니다. 그러나 어떻게 든 그것을 성취하지 못합니다. user1은 가입 절차를 거쳤지만 가입시 집으로 리디렉션됩니다. 기밀 사용자 범위 지정
Started POST "/user1" for 127.0.0.1 at 2014-06-03 10:58:58 +0530
Processing by Devise::RegistrationsController#create as HTML
Parameters: {"utf8"=>"✓", "authenticity_token"=>"yjG8AroaqqhCeyW9IDMNYHPV4+brvbdA3IlFNdf4Ecw=", "user1"=>{"email"=>"[email protected]", "password"=>"[FILTERED]", "password_confirmation"=>"[FILTERED]"}, "commit"=>"Sign up"}
(0.3ms) BEGIN
User1 Exists (48.8ms) SELECT 1 AS one FROM "user1" WHERE ""."email" = '[email protected]' LIMIT 1
user1 Load (25.8ms) SELECT "user1".* FROM "user1" WHERE "user1"."confirmation_token" = 'vzwnRygWM6HiPezPfPfq' LIMIT 1
SQL (70.6ms) INSERT INTO "user1" ("confirmation_sent_at", "confirmation_token", "confirmed_at", "created_at", "current_sign_in_at", "current_sign_in_ip", "email", "encrypted_password", "last_sign_in_at", "last_sign_in_ip", "name", "remember_created_at", "reset_password_sent_at", "reset_password_token", "role", "sign_in_count", "unconfirmed_email", "updated_at", "verified", "verified_by_admin") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12, $13, $14, $15, $16, $17, $18, $19, $20) RETURNING "id" [["confirmation_sent_at", Tue, 03 Jun 2014 05:28:59 UTC +00:00], ["confirmation_token", "vzwnRygWM6HiPezPfPfq"], ["confirmed_at", nil], ["created_at", Tue, 03 Jun 2014 05:28:59 UTC +00:00], ["current_sign_in_at", nil], ["current_sign_in_ip", nil], ["email", "[email protected]"], ["encrypted_password", "$2a$10$kwhkGjNd9ocZ3t.WUUZB4uGXFnpoDao9rHLD5rlEUR/iO0mVWQ1gS"], ["last_sign_in_at", nil], ["last_sign_in_ip", nil], ["name", ""], ["remember_created_at", nil], ["reset_password_sent_at", nil], ["reset_password_token", nil], ["role", nil], ["sign_in_count", 0], ["unconfirmed_email", nil], ["updated_at", Tue, 03 Jun 2014 05:28:59 UTC +00:00], ["verified", nil], ["verified_by_admin", nil]]
Rendered user1/mailer/confirmation_instructions.html.erb (0.8ms)
Sent mail to [email protected] (63ms)
Date: Tue, 03 Jun 2014 10:58:59 +0530
From: [email protected]
To: [email protected]
Message-ID: <538d5d1b7df6a[email protected]>
Subject: Confirmation instructions
Mime-Version: 1.0
Content-Type: text/html;
<p>You can confirm your account email through the link below:</p>
<p><a href="">Confirm my account</a></p>
Sent mail to [email protected] (2ms)
Date: Tue, 03 Jun 2014 10:58:59 +0530
To: [email protected]
Message-ID: <[email protected]>
Subject: Sign Up Confirmation
Mime-Version: 1.0
Content-Type: text/plain;
charset=UTF-8
Content-Transfer-Encoding: 7bit
(53.7ms) COMMIT
Redirected to http://localhost:3000/
Completed 302 Found in 882ms (ActiveRecord: 0.0ms)
Started GET "/" for 127.0.0.1 at 2014-06-03 10:58:59 +0530
Processing by HomeController#index as HTML
Rendered application/_cta.html.erb (0.0ms)
Rendered home/index.html.erb within layouts/application (2.7ms)
Rendered application/_header.html.erb (0.5ms)
Rendered application/_footer.html.erb (0.8ms)
Completed 200 OK in 67ms (Views: 66.1ms | ActiveRecord: 0.0ms)
내가 USER1에 대해 동일한을 달성 할 수있는 방법 나를 인도 마십시오
devise_for :user1
match 'user1/sign_up' => 'user1#new'
match 'user1/dashboard' => 'user1#dashboard'