violet_rails
violet_rails copied to clipboard
Fix urls for root domains
We are familiar with the fact that we need to pass host and/or subdomain parameters in url helper for it to work properly, especially for asset urls.
And we were passing either Subdomain.current.hostname or Apartment::Tenant.current as the subdomain, which is not consistent. Subdomain.current.hostname returns nil for root domain, which is fine, but Apartment::Tenant.current returns 'public' which causes all the asset urls to be prefixed with 'public'
rails_blob_url(attachment, subdomain: Apartment::Tenant.current, subdomain: Apartment::Tenant.current)
Issue: https://github.com/restarone/violet_rails/issues/1537
With this PR, we will no longer have to pass host and subdomain value to url helper. They are set by default based on the request host.
rails_blob_url(attachment)
You can pass the host and subdomain parameters if you want to override the default value
test plan ๐งช
- API Renderer - car app, car video app โ
- sign in โ
- Password reset flow โ
- account creation flow โ
- user invite flow โ
- forum file uploads โ
- CMS file uploads โ
- Forum post URL's โ
- temporary deployment to nikean.org โ
- downloading API Resources from an API Namespace (with non primitive properties) โ
- export Namespace in JSON format with associations (with non primitive properties) โ
@Pralish I see the API surface for URL's and asset linking as changed, could you write some documentation to include as part of the release for server engineers to use as reference?
Deployed review-app can be viewed at https://review-1507.violet-test.net
Deployed review-app can be viewed at https://review-1507.violet-test.net
Deployed review-app can be viewed at https://review-1507.violet-test.net
Deployed review-app can be viewed at https://review-1507.violet-test.net
Deployed review-app can be viewed at https://review-1507.violet-test.net
Deployed review-app can be viewed at https://review-1507.violet-test.net
Deployed review-app can be viewed at https://review-1507.violet-test.net
Deployed review-app can be viewed at https://review-1507.violet-test.net
Deployed review-app can be viewed at https://review-1507.violet-test.net
@Pralish could you please take a look at the review app? There are some major breakages that prevent UAT:
Admin redirect broken:
https://user-images.githubusercontent.com/35935196/235655799-86f198f7-565b-4f3e-9a66-3350c6a7c411.mov
password reset email link is broken
Deployed review-app can be viewed at https://review-1507.violet-test.net