質問編集履歴

2

問題点が変更となった為、追記しました。

2018/06/06 09:25

投稿

maki_k
maki_k

スコア17

test CHANGED
File without changes
test CHANGED
@@ -107,3 +107,15 @@
107
107
  end
108
108
 
109
109
  ```
110
+
111
+
112
+
113
+ 追記:`hoge.rb`の
114
+
115
+ `c.merge_validates_uniqueness_of_login_field_options(:case_sensitive => true)`を
116
+
117
+ `c.validates_uniqueness_of_login_field_options[:case_sensitive] = true`に直したところ
118
+
119
+ 上記エラーは発生しなくなりましたが、ただしいID/パスワードをいれても、ログインID/パスワードが間違っている扱いとなってしまい、
120
+
121
+ ログインすることができない状態となっています。

1

Railsのバージョンアップに際しと題していましたが、Authlogicが原因のようなのでタイトルを修正しました。

2018/06/06 09:24

投稿

maki_k
maki_k

スコア17

test CHANGED
@@ -1 +1 @@
1
- RailsのバージョンアップでArel::Visitors::UnsupportedVisitErrorエラー
1
+ AuthlogicでArel::Visitors::UnsupportedVisitErrorエラー
test CHANGED
@@ -32,9 +32,9 @@
32
32
 
33
33
 
34
34
 
35
- `Ruby 2.5.0(旧:1.9.3)`
35
+ `Ruby 2.5.0(旧:1.9.x)`
36
36
 
37
- `Rails 5.1.6(旧:3.2.13)`
37
+ `Rails 5.1.6(旧:3.2.x)`
38
38
 
39
39
  `Authlogic 4.1.0(旧:3.1.0)`
40
40
 
@@ -86,6 +86,24 @@
86
86
 
87
87
 
88
88
 
89
+ ```ruby
90
+
91
+ #model/hoge.rb
92
+
93
+ class Hoge < ApplicationRecord
89
94
 
90
95
 
96
+
97
+ acts_as_authentic do |c|
98
+
99
+ c.logged_in_timeout = 999.years
100
+
101
+ c.password_salt_field = false
102
+
103
+ c.validate_login_field = false
104
+
105
+ c.merge_validates_uniqueness_of_login_field_options(:case_sensitive => true)
106
+
91
- #
107
+ end
108
+
109
+ ```