pet-rescue icon indicating copy to clipboard operation
pet-rescue copied to clipboard

Display "Featured pets" on the org home page

Open nsiwnf opened this issue 1 year ago • 8 comments

Randomly select 4 of the org's adoptable_pets to display on the home page. Change copy under the pet image to "Adopt [pet's name] ->" as shown below.

Screen Shot 2024-03-17 at 6 54 57 PM

nsiwnf avatar Mar 18 '24 01:03 nsiwnf

I can take this!

DreamVenerable avatar Mar 19 '24 04:03 DreamVenerable

@DreamVenerable @nsiwnf Any progress on this? If not, I can take care of it this weekend.

VonTeacher avatar Apr 11 '24 22:04 VonTeacher

I got busy and totally forgot about it 😅

You are free to take it!

DreamVenerable avatar Apr 11 '24 22:04 DreamVenerable

OK, thanks for the response. If you want, I can ping you when it's ready for review. :)

@nsiwnf, pinging for reassignment.

VonTeacher avatar Apr 11 '24 23:04 VonTeacher

@VonTeacher All yours!

kasugaijin avatar Apr 14 '24 21:04 kasugaijin

I have a sample of pet cards displaying on the organization's HomeController, but I'm unsure of the best or established pattern in the repository for that query and creation of the instance variable in app/controllers/organizations/home_controller.rb, so feedback is particularly welcome.

VonTeacher avatar Apr 21 '24 05:04 VonTeacher

Can you make a draft PR with your approach? It's easier to comment on the existing code and gives you a chance to choose a solution. I see what you mean though, it's a one-off type of query that doesn't relate particularly well to any specific model, enough to put on a model for example.

Edit: I took a look at your PR and think the approach is fine. Review to follow!

kasugaijin avatar Apr 22 '24 02:04 kasugaijin

@VonTeacher I will unassign so someone else can finish this off. But, let me know if you want to finish it!

Just a couple comments to address in the PR (delete some tests). It should be a quick fix. https://github.com/rubyforgood/pet-rescue/pull/660

kasugaijin avatar May 17 '24 16:05 kasugaijin

Closed by #784

meg-gutshall avatar Jun 01 '24 14:06 meg-gutshall