-
Notifications
You must be signed in to change notification settings - Fork 166
LG-4944: track whether the user edits their address or not #5484
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -11,8 +11,9 @@ def self.model_name | |
| ActiveModel::Name.new(self, nil, 'Address') | ||
| end | ||
|
|
||
| def initialize(user) | ||
|
||
| @user = user | ||
| def initialize(pii) | ||
| @pii = pii | ||
| @address_edited = false | ||
| end | ||
|
|
||
| def submit(params) | ||
|
|
@@ -21,7 +22,10 @@ def submit(params) | |
| FormResponse.new( | ||
| success: valid?, | ||
| errors: errors, | ||
| extra: { pii_like_keypaths: [[:errors, :zipcode ], [:error_details, :zipcode]] }, | ||
| extra: { | ||
| address_edited: @address_edited, | ||
| pii_like_keypaths: [[:errors, :zipcode ], [:error_details, :zipcode]], | ||
| }, | ||
| ) | ||
| end | ||
|
|
||
|
|
@@ -31,6 +35,9 @@ def consume_params(params) | |
| params.each do |key, value| | ||
| raise_invalid_address_parameter_error(key) unless ATTRIBUTES.include?(key.to_sym) | ||
| send("#{key}=", value) | ||
| if send(key) != @pii[key] && (send(key).present? || @pii[key].present?) | ||
| @address_edited = true | ||
| end | ||
| end | ||
| end | ||
|
|
||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I feel like sometimes we have a
idv/capture_dockey in here for the hybrid flow? does this always exist?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is past the point where the hybrid flow rejoins the regular doc_auth flow so I assume so. I tried it out locally in the hybrid flow and it worked.