0

クライアント側の検証でdeviseを使用し、確認可能なオプションを設定しました。

サインアップするとメールが送信されますが、コントローラーがアカウントが確認されていないことを確認できず、サインインしようとしているようです。

Started GET "/" for 127.0.0.1 at 2011-05-24 14:41:47 +0200
  Processing by HomeController#index as HTML
Completed   in 156ms


Started GET "/users/sign_in" for 127.0.0.1 at 2011-05-24 14:41:47 +0200
  Processing by Devise::SessionsController#new as HTML
  SQL (3.5ms)   SELECT a.attname, format_type(a.atttypid, a.atttypmod), d.adsrc, a.attnotnull
 FROM pg_attribute a LEFT JOIN pg_attrdef d
 ON a.attrelid = d.adrelid AND a.attnum = d.adnum
 WHERE a.attrelid = '"users"'::regclass
 AND a.attnum > 0 AND NOT a.attisdropped
 ORDER BY a.attnum

Rendered devise/shared/_links.erb (23.5ms)
Rendered devise/sessions/new.html.erb within layouts/application (92.2ms)
Completed 200 OK in 646ms (Views: 117.4ms | ActiveRecord: 3.5ms)

どこを見ればいいの?

4

1 に答える 1

1

initializers/devise.rbに構成があります。

  # The time you want to give your user to confirm his account. During this time
  # he will be able to access your application without confirming. Default is 0.days
  # When confirm_within is zero, the user won't be able to sign in without confirming.
  # You can use this to let your user access some features of your application
  # without confirming the account, but blocking it after a certain period
  # (ie 2 days).
  config.confirm_within = 2.days

おそらくこれが、登録後にサインインを試み、何らかの値に設定されている場合はユーザーにログインする理由です。

于 2011-05-24T14:18:09.000 に答える