-
Notifications
You must be signed in to change notification settings - Fork 124
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
Featured Pets: improvements #1198
Comments
@kasugaijin please assgin! |
@Aaryanpal how's this going? |
@kasugaijin haven't started it yet. |
@Aaryanpal awesome thanks for the update ! |
Completed |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
On the org home page, we see some feature pets. Let's improve this:
@pets
collection query should be improved. The collection is set using a sample of 4, but this fails when the available pets is less than 4, because it starts to duplicate. So, I think we need a check there to see if the total number of adoptable pets is greater than 4, then sample 4, otherwise, return all pets (could be 1, 2, or 3 in total). Note, we do not need this line in the query.where(organization: Current.organization)
because all Pet queries in this controller scope are already scoped to the tenant. Finally please use thePet.unadopted
scope to only return adoptable pets.Example of different height images, that should be the same height

The text was updated successfully, but these errors were encountered: