File tree Expand file tree Collapse file tree 5 files changed +39
-8
lines changed
Expand file tree Collapse file tree 5 files changed +39
-8
lines changed Original file line number Diff line number Diff line change @@ -61,6 +61,8 @@ gem "filterrific"
6161gem "jbuilder"
6262# Pagination of models for use in views.
6363gem "kaminari"
64+ # Prevents cookie overflow errors when storing large flash messages.
65+ gem 'memflash'
6466# Web-based authorization framework.
6567gem "omniauth"
6668# Required to avoid authentication issues with Rails.
Original file line number Diff line number Diff line change @@ -385,10 +385,11 @@ GEM
385385 net-smtp
386386 marcel (1.0.4 )
387387 matrix (0.4.2 )
388+ memflash (2.6.0 )
389+ actionpack (>= 7.0 )
388390 memory_profiler (1.1.0 )
389391 method_source (1.1.0 )
390392 mini_mime (1.1.5 )
391- mini_portile2 (2.8.9 )
392393 minitest (5.25.5 )
393394 monetize (1.12.0 )
394395 money (~> 6.12 )
419420 net-protocol
420421 newrelic_rpm (9.16.0 )
421422 nio4r (2.7.4 )
422- nokogiri (1.18.8 )
423- mini_portile2 (~> 2.8.2 )
424- racc (~> 1.4 )
425423 nokogiri (1.18.8-arm64-darwin )
426424 racc (~> 1.4 )
427425 nokogiri (1.18.8-x86_64-darwin )
745743
746744PLATFORMS
747745 arm64-darwin
748- ruby
749746 x86_64-darwin
750747 x86_64-linux
751748 x86_64-linux-gnu
@@ -796,6 +793,7 @@ DEPENDENCIES
796793 lograge
797794 magic_test
798795 matrix
796+ memflash
799797 memory_profiler
800798 money-rails
801799 newrelic_rpm
@@ -843,4 +841,4 @@ DEPENDENCIES
843841 webmock (~> 3.25 )
844842
845843BUNDLED WITH
846- 2.6.9
844+ 2.7.0
Original file line number Diff line number Diff line change 11<%= turbo_frame_tag "flash" do %>
2- <% flash.each do |key, message | %>
2+ <% flash.keys. each do |key| %>
33 <div
44 class ="<%= flash_class ( key ) %> alert-dismissible "
55 role ="alert "
6- style ="white-space: pre-line; "> <%= message %> </ div >
6+ style ="white-space: pre-line; "> <%= flash [ key ] %> </ div >
77 <% end %>
88<% end %>
Original file line number Diff line number Diff line change 1+ NDBN Member Number,Member Name
2+ ,
3+ ,
4+ ,
5+ ,
6+ ,
7+ ,
8+ ,
9+ ,
10+ ,
11+ ,
12+ ,
13+ ,
14+ ,
15+ ,
16+ ,
17+ ,
Original file line number Diff line number Diff line change 1010
1111 expect ( page ) . to have_content ( "NDBN Members have been updated!" )
1212 end
13+
14+ context "when uploading a CSV with many errors" do
15+ it "renders all error messages without cookie overflow" do
16+ user = create ( :super_admin )
17+ sign_in ( user )
18+ visit admin_ndbn_members_path
19+
20+ import_path = "#{ Rails . root } /spec/fixtures/ndbn-many-errors-import.csv"
21+ attach_file ( "member_file" , import_path )
22+ click_button "Upload"
23+
24+ expect ( page ) . to have_content ( "NDBN member can't be blank" )
25+ end
26+ end
1327end
You can’t perform that action at this time.
0 commit comments