Skip to content

Commit 4b705d9

Browse files
Migration can not rolled back as sessions are now secure hashes. Thanks to @n00dle.
Co-authored-by: n00dle <[email protected]>
1 parent 90a4cb2 commit 4b705d9

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

README.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,9 +119,13 @@ The following example Active Record Migration will work for the default setup of
119119
```ruby
120120
# db/migrate/20210310083511_cve201925025_mitigation.rb
121121
class Cve201925025Mitigation < ActiveRecord::Migration[5.2]
122-
def change
122+
def up
123123
ActionDispatch::Session::ActiveRecordStore.session_class.find_each(&:secure!)
124124
end
125+
126+
def down
127+
# no-op
128+
end
125129
end
126130
```
127131

0 commit comments

Comments
 (0)