Commit 1165ee6
committed
refactor(member): migrate details to params.expect, fix mixed access
- Convert member_params to params.expect with nested array syntax
- Remove direct params[:member] access (was security issue)
- Refactor how_you_found_us validation to accept params hash
- Fix validation order: validate before clearing other_reason
- Call member_params only once (performance improvement)
Security fix: Previously mixed permitted params with raw params access,
allowing potential bypass of strong parameters. Now all access goes
through params.expect.
Bug fix: Validation now properly checks before modifying attributes.1 parent 7d479d9 commit 1165ee6
1 file changed
Lines changed: 6 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
12 | | - | |
| 12 | + | |
13 | 13 | | |
14 | | - | |
15 | | - | |
| 14 | + | |
| 15 | + | |
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
21 | | - | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
22 | 24 | | |
23 | 25 | | |
24 | 26 | | |
| |||
0 commit comments