Skip to content

Commit 2b4478c

Browse files
authored
Upgrade Devise to version 5 (#437)
* Upgrade Devise to version 5 * Remove flash alert from devise error partial The flash[:alert] block was removed from the _devise_error_alert partial, leaving only resource.errors display and leaving authentication alerts to be handled consistently by the global flash message system. Updated the sessions feature spec to match the new error message casing for invalid login attempts.
1 parent 7113a1c commit 2b4478c

File tree

3 files changed

+5
-9
lines changed

3 files changed

+5
-9
lines changed

Gemfile.lock

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ GEM
9595
ast (2.4.3)
9696
base64 (0.3.0)
9797
bcrypt (3.1.21)
98-
bigdecimal (3.3.1)
98+
bigdecimal (4.0.1)
9999
bindex (0.8.1)
100100
brakeman (7.1.2)
101101
racc
@@ -146,10 +146,10 @@ GEM
146146
decent_exposure (3.0.4)
147147
activesupport (>= 4.0)
148148
device_detector (1.1.3)
149-
devise (4.9.4)
149+
devise (5.0.0)
150150
bcrypt (~> 3.0)
151151
orm_adapter (~> 0.1)
152-
railties (>= 4.1.0)
152+
railties (>= 7.0)
153153
responders
154154
warden (~> 1.2.3)
155155
diff-lcs (1.6.2)

app/views/shared/_devise_error_alert.html.erb

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,4 @@
1-
<% if flash[:alert] %>
2-
<div class="mt-2 text-center text-sm text-red-600">
3-
<%= flash[:alert] %>
4-
</div>
5-
<% end %>
1+
62

73
<% if resource.errors.any? %>
84
<div class="mt-2 text-center text-sm text-red-600">

spec/features/sessions_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
fill_in "Password", with: 'randopassword'
3636
click_button 'Log in'
3737

38-
expect(page).to have_content 'Invalid Email or password.'
38+
expect(page).to have_content 'Invalid email or password.'
3939
end
4040

4141
scenario "Deactivated account" do

0 commit comments

Comments
 (0)