Skip to content
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

Art/power of attorney request status updates.models #19600

Closed

Conversation

nihil2501
Copy link
Contributor

@nihil2501 nihil2501 commented Nov 25, 2024

Spikes modeling of POA request status updates with ActiveRecord's newer delegated types feature as a good fit for querying one-to-many of subtypes. E.g.:

poa_request = PowerOfAttorneyRequest.first
poa_request.status_updates.includes(:status_updating).order(created_at: :desc).limit(50)

Notes

  • We could also namespace e.g. PowerOfAttorneyRequest::Withdrawal if we want

Copy link

1 Error
🚫

Modified files in db/migrate or db/schema.rb changes should be the only files checked into this PR.

File Summary

DB File(s)

  • db/schema.rb

  • modules/accredited_representative_portal/db/migrate/20241125061506_create_ar_power_of_attorney_request_status_updates.rb

    App File(s)

    • modules/accredited_representative_portal/accredited_representative_portal.gemspec
  • modules/accredited_representative_portal/app/models/accredited_representative_portal/power_of_attorney_request_decision.rb

  • modules/accredited_representative_portal/app/models/accredited_representative_portal/power_of_attorney_request_expiration.rb

  • modules/accredited_representative_portal/app/models/accredited_representative_portal/power_of_attorney_request_replacement.rb

  • modules/accredited_representative_portal/app/models/accredited_representative_portal/power_of_attorney_request_status_update.rb

  • modules/accredited_representative_portal/app/models/accredited_representative_portal/power_of_attorney_request_withdrawal.rb

  • modules/accredited_representative_portal/bin/rails

  • modules/accredited_representative_portal/lib/accredited_representative_portal/engine.rb

  • modules/accredited_representative_portal/spec/models/accredited_representatiive_portal/power_of_attorney_request_status_update_spec.rb

Application code must always be backwards compatible with the DB,
both before and after migrations have been run. For more info:

Generated by 🚫 Danger

Unit test demonstrates querying convenience with `includes`
@nihil2501 nihil2501 force-pushed the art/power-of-attorney-request-status-updates.models branch from 2d8e45a to d754b00 Compare December 2, 2024 20:42
@va-vfs-bot va-vfs-bot temporarily deployed to art/power-of-attorney-request-status-updates.models/main/main December 2, 2024 21:19 Inactive
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The spec directory has a type where "representatiive" with two i's

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants