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

Search age range #25

Open
wants to merge 4 commits into
base: dev
Choose a base branch
from
Open

Search age range #25

wants to merge 4 commits into from

Conversation

tamlyn10
Copy link
Contributor

No description provided.

end

Then(/^a list of age\-filtered profiles is diplayed$/) do
save_and_open_page
Copy link
Member

Choose a reason for hiding this comment

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

This needs to go too!

Copy link
Contributor Author

Choose a reason for hiding this comment

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

fixed now.. thanks!

@@ -23,6 +23,15 @@ def search
if params[:distance]
@results = @results.near(current_customer.profile.postcode, params[:distance].to_f)
end

if params[:age]
@results = @results.select do |result|
Copy link
Member

Choose a reason for hiding this comment

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

Rather than using select, use a where and perform your searches at the DB level

@dmgarland
Copy link
Member

@tamlyn10 this needs patching up before I can merge

@dmgarland
Copy link
Member

Still got some failing tests on this one

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

Successfully merging this pull request may close these issues.

2 participants